Avoid a crash on Linux systems
Use vsnprintf() (with n=0) instead of vsprintf() in dry-run mode.
This commit is contained in:
parent
10dd6865a1
commit
f8740ea1ec
@ -2650,7 +2650,7 @@ static int _makefile_print(FILE * fp, char const * format, ...)
|
||||
|
||||
va_start(ap, format);
|
||||
if(fp == NULL)
|
||||
ret = vsprintf(NULL, format, ap);
|
||||
ret = vsnprintf(NULL, 0, format, ap);
|
||||
else
|
||||
ret = vfprintf(fp, format, ap);
|
||||
va_end(ap);
|
||||
|
Loading…
Reference in New Issue
Block a user