Closed ofalk closed 4 years ago
Fixing with simply replacing with strncpy leads to:
fw.c: In function ‘arg_to_fr’:
fw.c:103:3: warning: ‘strncpy’ specified bound 16 equals destination size [-Wstringop-truncation]
103 | strncpy(fr->fw_device, argv[2], sizeof(fr->fw_device));
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Yeah, null termination byte of course.
This is a non-standard glibc function and only available in libbsd.