diff --git a/lib/lib.error.c b/lib/lib.error.c index b364eda51bc..cbd978cf489 100644 --- a/lib/lib.error.c +++ b/lib/lib.error.c @@ -113,13 +113,14 @@ void vlogmsg(int msglevel, const char *mesg, va_list ap) bufferlen = strlen(timestring)+strlen(progname_escaped)+strlen(mesg)+20; buffer = (char *)malloc(bufferlen); if ( buffer==NULL ) abort(); - progname_unformatted = (char *)malloc(1+strlen(progname_escaped)); + progname_unformatted = (char *)malloc(1+2*strlen(progname_escaped)); size_t str_tmp_pos, esc_tmp_pos; char ctmp; for(str_tmp_pos=0; str_tmp_pos