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