From f810762936dabb945e84d539c828074ba204cb01 Mon Sep 17 00:00:00 2001 From: fyodor Date: Sat, 28 Jun 2008 21:23:39 +0000 Subject: [PATCH] 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. --- output.cc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/output.cc b/output.cc index a9aaf6059..cc048280f 100644 --- a/output.cc +++ b/output.cc @@ -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);