Use size of destination buffer, rather than a constant that may or may not correspond to the source buffer, to restrict the length of copied strings. In particular, pr_fname has 16+1 characters but MAXCOMLEN is 18+1. Use strlcpy instead of strncpy to ensure the result is nul-terminated. This seems to be what is expected of these fields. Reported by: Coverity CIDs: 1011302, 1011378 Sponsored by: EMC / Isilon Storage Division |
||
---|---|---|
.. | ||
elf32core.c | ||
elfcore.c | ||
extern.h | ||
gcore.1 | ||
gcore.c | ||
Makefile | ||
Makefile.depend |