6f7d610621
Before "strlen(outbuf)", if one of the pr_*() functions forgot to do it. This prevents an out-of-bounds read in strlen(), and an out-of-bounds write in "outbuf[sz] = '\n'". Another solution would be to replace strlen() with strnlen(), but this is not used anywhere else in the code-base and may not exist in all libc's. ---------------------------- adapted for newlib branch . adapted via 'patch' without rejections Signed-off-by: Jim Warner <james.warner@comcast.net> |
||
---|---|---|
.. | ||
common.h | ||
COPYING | ||
display.c | ||
global.c | ||
HACKING | ||
help.c | ||
output.c | ||
parser.c | ||
ps.1 | ||
regression | ||
select.c | ||
sortformat.c | ||
stacktrace.c |