summaryrefslogtreecommitdiffstats
path: root/lisp/idutils.el
diff options
context:
space:
mode:
authorJim Meyering <jim@meyering.net>2012-10-23 16:10:21 +0200
committerJim Meyering <jim@meyering.net>2012-10-23 16:13:40 +0200
commit36a93b370040444d6d2240100404490064b6fa00 (patch)
tree32ff82b393ebbe6fb3d64de0c94ecdef89abe86b /lisp/idutils.el
parentb7ac27d5fe9ef7751b79812dc0095a59bddbfd4d (diff)
downloadidutils-36a93b370040444d6d2240100404490064b6fa00.tar.gz
idutils-36a93b370040444d6d2240100404490064b6fa00.tar.bz2
idutils-36a93b370040444d6d2240100404490064b6fa00.zip
lid: avoid reading beyond end of buffer for a long name
* libidu/idfile.h (stzncpy): Define, from coreutils. * src/lid.c (query_ambiguous_prefix): Avoid buffer overrun. Using strncpy to copy a too-long name would result in a "name" that is not NUL-terminated, yet that name would be treated as a NUL-terminated string immediately afterwards, via report_func, which attempts to print it. * libidu/fnprint.c (root_name): Use stzncpy in place of strncpy. * NEWS (Bug fixes): Mention the bug fix.
Diffstat (limited to 'lisp/idutils.el')
0 files changed, 0 insertions, 0 deletions