Oops, previous commit would cause sprintf() to overrun the malloc()ed
buffer by exactly one character. Add some slack. Sponsored by: DARPA, NAI Labs git-svn-id: svn+ssh://svn.openpam.org/svn/openpam/trunk@52 185d5e19-27fe-0310-9dcf-9bff6b9f3609
This commit is contained in:
parent
1840f8c6fe
commit
f8ad159142
|
@ -74,7 +74,7 @@ _openpam_log(int level, const char *func, const char *fmt, ...)
|
|||
va_start(ap, fmt);
|
||||
for (len = strlen(fmt); len > 0 && isspace(fmt[len]); len--)
|
||||
/* nothing */;
|
||||
if ((format = malloc(strlen(func) + len + 8)) != NULL) {
|
||||
if ((format = malloc(strlen(func) + len + 16)) != NULL) {
|
||||
sprintf(format, "in %s(): %.*s\n", func, len, fmt);
|
||||
vsyslog(priority, format, ap);
|
||||
#ifdef DEBUG
|
||||
|
|
Loading…
Reference in New Issue