Actions
Bug #2963
closedscan-build warnings for pcap logging
Status:
Closed
Priority:
Normal
Assignee:
-
Target version:
-
Affected Versions:
Effort:
Difficulty:
Label:
Description
CC log-pcap.o log-pcap.c:766:31: warning: The third argument allows to potentially copy more bytes than it should. Replace with the value sizeof(pattern) or lower strlcat(pattern, "/", PATH_MAX); ^~~~~~~~ /usr/include/linux/limits.h:13:25: note: expanded from macro 'PATH_MAX' #define PATH_MAX 4096 /* # chars in a path name including nul */ ^~~~ log-pcap.c:775:40: warning: The third argument allows to potentially copy more bytes than it should. Replace with the value sizeof(pattern) or lower strlcat(pattern, part, PATH_MAX); ^~~~~~~~ /usr/include/linux/limits.h:13:25: note: expanded from macro 'PATH_MAX' #define PATH_MAX 4096 /* # chars in a path name including nul */ ^~~~ log-pcap.c:786:43: warning: The third argument allows to potentially copy more bytes than it should. Replace with the value sizeof(pattern) or lower strlcat(pattern, tmp, PATH_MAX); ^~~~~~~~ /usr/include/linux/limits.h:13:25: note: expanded from macro 'PATH_MAX' #define PATH_MAX 4096 /* # chars in a path name including nul */ ^~~~ log-pcap.c:790:43: warning: The third argument allows to potentially copy more bytes than it should. Replace with the value sizeof(pattern) or lower strlcat(pattern, "*", PATH_MAX); ^~~~~~~~ /usr/include/linux/limits.h:13:25: note: expanded from macro 'PATH_MAX' #define PATH_MAX 4096 /* # chars in a path name including nul */ ^~~~ log-pcap.c:799:38: warning: The third argument allows to potentially copy more bytes than it should. Replace with the value sizeof(pattern) or lower strlcat(pattern, pl->prefix, PATH_MAX); ^~~~~~~~ /usr/include/linux/limits.h:13:25: note: expanded from macro 'PATH_MAX' #define PATH_MAX 4096 /* # chars in a path name including nul */ ^~~~ log-pcap.c:800:32: warning: The third argument allows to potentially copy more bytes than it should. Replace with the value sizeof(pattern) or lower strlcat(pattern, ".*", PATH_MAX); ^~~~~~~~ /usr/include/linux/limits.h:13:25: note: expanded from macro 'PATH_MAX' #define PATH_MAX 4096 /* # chars in a path name including nul */ ^~~~ log-pcap.c:802:34: warning: The third argument allows to potentially copy more bytes than it should. Replace with the value sizeof(pattern) or lower strlcat(pattern, pl->suffix, PATH_MAX); ^~~~~~~~ /usr/include/linux/limits.h:13:25: note: expanded from macro 'PATH_MAX' #define PATH_MAX 4096 /* # chars in a path name including nul */ ^~~~ 7 warnings generated.
Updated by Andreas Herz over 5 years ago
- Assignee set to OISF Dev
- Target version set to TBD
Updated by Victor Julien over 5 years ago
- Related to Task #3153: tracking: scan-build warnings added
Updated by Victor Julien over 1 year ago
- Status changed from New to Closed
- Assignee deleted (
OISF Dev) - Target version deleted (
TBD)
Warning doesn't appear anymore.
Actions