]> CyberLeo.Net >> Repos - FreeBSD/stable/9.git/commit
MFC r229794:
authortijl <tijl@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 13 Feb 2012 10:24:49 +0000 (10:24 +0000)
committertijl <tijl@ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f>
Mon, 13 Feb 2012 10:24:49 +0000 (10:24 +0000)
commit8270be7df0a430677fa6590f9cfbff1f62d1a133
treef63a470905ffab3ce0cb2b17a50335bbfba5db51
parenta7b1f59bc5ce238c00d4003d4f1ec7a7267ae8e5
MFC r229794:

- Fix how hexdump parses escape strings
From the NetBSD bug:
The way how hexdump(1) parses escape sequences has some bugs.
It shows up when an escape sequence is used as the non-last character
of a format string.

MFC r230649:

Fix decoding of escape sequences in format strings:
- Zero-terminate the resulting string by letting the for-loop copy the
  terminating zero.
- Exit the for-loop after handling a backslash at the end of the format
  string to fix a buffer overrun.
- Remove some unnecessary comments and blank lines.

PR: bin/144722

git-svn-id: svn://svn.freebsd.org/base/stable/9@231578 ccf9f872-aa2e-dd11-9fc8-001c23d0bc1f
usr.bin/hexdump/parse.c