diff options
author | jhb <jhb@FreeBSD.org> | 2016-10-06 19:41:09 +0000 |
---|---|---|
committer | jhb <jhb@FreeBSD.org> | 2016-10-06 19:41:09 +0000 |
commit | ae1958d197960436ece49a118519c2722ec64aaf (patch) | |
tree | 3f0670c20ae21b3e6b95a1bed9f7f1728843e96c /contrib/diff | |
parent | dd4e81eb7d7d66d675f6554e6d582dbc9288cb6d (diff) | |
download | FreeBSD-src-ae1958d197960436ece49a118519c2722ec64aaf.zip FreeBSD-src-ae1958d197960436ece49a118519c2722ec64aaf.tar.gz |
MFC 299458: Fix buffer overrun in gcore(1) NT_PRPSINFO
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.
Diffstat (limited to 'contrib/diff')
0 files changed, 0 insertions, 0 deletions