Changeset 52 in openpam


Ignore:
Timestamp:
Feb 13, 2002, 12:41:06 AM (17 years ago)
Author:
Dag-Erling Smørgrav
Message:

Oops, previous commit would cause sprintf() to overrun the malloc()ed
buffer by exactly one character. Add some slack.

Sponsored by: DARPA, NAI Labs

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/openpam_log.c

    r51 r52  
    7575        for (len = strlen(fmt); len > 0 && isspace(fmt[len]); len--)
    7676                /* nothing */;
    77         if ((format = malloc(strlen(func) + len + 8)) != NULL) {
     77        if ((format = malloc(strlen(func) + len + 16)) != NULL) {
    7878                sprintf(format, "in %s(): %.*s\n", func, len, fmt);
    7979                vsyslog(priority, format, ap);
Note: See TracChangeset for help on using the changeset viewer.