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:
Dag-Erling Smørgrav 2002-02-13 00:41:06 +00:00
parent 1840f8c6fe
commit f8ad159142
1 changed files with 1 additions and 1 deletions

View File

@ -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