diff --git a/lib/vsnprintf.c b/lib/vsnprintf.c index 16d449cf..bc54f949 100644 --- a/lib/vsnprintf.c +++ b/lib/vsnprintf.c @@ -23,17 +23,15 @@ int vsnprintf(char *str, size_t size, const char *format, va_list ap) int rv, bytes; if (size > BUFFER_SIZE) { - nasm_malloc_error(ERR_PANIC|ERR_NOFILE, - "snprintf: size (%d) > BUFFER_SIZE (%d)", - size, BUFFER_SIZE); + nasm_error(ERR_PANIC|ERR_NOFILE, + "vsnprintf: size (%d) > BUFFER_SIZE (%d)", + size, BUFFER_SIZE); size = BUFFER_SIZE; } rv = vsprintf(snprintf_buffer, format, ap); - if (rv >= BUFFER_SIZE) { - nasm_malloc_error(ERR_PANIC|ERR_NOFILE, - "snprintf buffer overflow"); - } + if (rv >= BUFFER_SIZE) + nasm_error(ERR_PANIC|ERR_NOFILE, "vsnprintf buffer overflow"); if (size > 0) { if ((size_t)rv < size-1)