mirror of
https://github.com/nmap/nmap.git
synced 2026-01-03 13:19:04 +00:00
Increase write buffer length for Nmap output on Windows. This should
prevent error messages like: "log_vwrite: vnsprintf failed. Even after increasing bufferlen to 819200, Vsnprintf returned -1 (logt == 1)." Thanks to prozente0 for the report.
This commit is contained in:
@@ -1054,7 +1054,7 @@ void log_vwrite(int logt, const char *fmt, va_list ap) {
|
||||
/* Windows seems to just give -1 rather than the amount of space we
|
||||
would need. So lets just gulp up a huge amount in the hope it
|
||||
will be enough */
|
||||
writebuflen *= 100;
|
||||
writebuflen *= 150;
|
||||
}
|
||||
writebuf = (char *) safe_realloc(writebuf, writebuflen);
|
||||
len = Vsnprintf(writebuf, writebuflen, fmt, apcopy);
|
||||
|
||||
Reference in New Issue
Block a user