1
0
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:
fyodor
2008-06-28 21:23:39 +00:00
parent 60774c2313
commit f810762936

View File

@@ -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);