1
0
mirror of https://github.com/nmap/nmap.git synced 2026-01-17 20:09:02 +00:00

Open log files in binary mode.

This avoids CRLF translation on Windows.
This commit is contained in:
david
2013-08-16 17:08:46 +00:00
parent 343e09c2fa
commit ec311d78c5

View File

@@ -459,9 +459,9 @@ int ncat_delay_timer(int delayval)
int ncat_openlog(const char *logfile, int append)
{
if (append)
return Open(logfile, O_WRONLY | O_CREAT | O_APPEND, 0664);
return Open(logfile, O_BINARY | O_WRONLY | O_CREAT | O_APPEND, 0664);
else
return Open(logfile, O_WRONLY | O_CREAT | O_TRUNC, 0664);
return Open(logfile, O_BINARY | O_WRONLY | O_CREAT | O_TRUNC, 0664);
}
static int ncat_hexdump(int logfd, const char *data, int len);