Skip to content

Commit

Permalink
Revert "Remove CWE134 error"
Browse files Browse the repository at this point in the history
This reverts commit c9d0195.
  • Loading branch information
vmcj committed Jan 24, 2022
1 parent c9d0195 commit d02b0f5
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/lib.error.c
Original file line number Diff line number Diff line change
Expand Up @@ -109,12 +109,12 @@ void vlogmsg(int msglevel, const char *mesg, va_list ap)
progname_escaped = printf_escape(progname);
if ( progname_escaped==NULL ) abort();

bufferlen = strlen(timestring)+strlen(mesg)+20;
bufferlen = strlen(timestring)+strlen(progname_escaped)+strlen(mesg)+20;
buffer = (char *)malloc(bufferlen);
if ( buffer==NULL ) abort();

snprintf(buffer, bufferlen, "[%s] [%d]: %s\n",
timestring, getpid(), mesg);
snprintf(buffer, bufferlen, "[%s] %s[%d]: %s\n",
timestring, progname_escaped, getpid(), mesg);

free(progname_escaped);

Expand Down

0 comments on commit d02b0f5

Please sign in to comment.