diff --git a/src/utils.c b/src/utils.c index 3c873d0e..af621402 100644 --- a/src/utils.c +++ b/src/utils.c @@ -213,7 +213,11 @@ aprintf (const char *fmt, ...) if (size >= FMT_MAX_LENGTH) /* We have a huge buffer, */ { /* maybe we have some wrong format string? */ free (str); /* In this case we must free already allocated memory, */ - return NULL; /* and return NULL pointer... */ + logprintf (LOG_ALWAYS, + _("%s: aprintf: text buffer is too big (%ld bytes), \ +free already allocated memory and abort.\n"), + exec_name, size); /* printout a log message */ + abort (); /* and abort... */ } /* else, we continue to grow our buffer. */ size <<= 1; /* twice the old size */