Commit 8aeecbfc authored by Vaibhav Gupta's avatar Vaibhav Gupta Committed by Federico Vaga

software: tools: fau-acq-time: Fix "[-Werror=stringop-truncation]"

In "main()", the "strncat()" is given the size equal to the destination
size. Thus, in worst case scenario, the string which needs to be
suffixed, will be truncated. Fix the warning.
Signed-off-by: 's avatarVaibhav Gupta <vaibhav.gupta@cern.ch>
Reviewed-by: Federico Vaga's avatarFederico Vaga <federico.vaga@cern.ch>
parent 7f248d60
......@@ -154,7 +154,7 @@ int main(int argc, char *argv[])
exit(1);
}
strncat(basepath, argv[argc-1], base_len);
strncat(basepath, argv[argc-1], base_len - strlen(basepath));
printf("Sysfs path to device is: %s\n", basepath);
if (last) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment