From c517a80acd7af7bd40ee0b8f60d69312ecf6ca50 Mon Sep 17 00:00:00 2001 From: david Date: Fri, 14 Dec 2007 09:06:45 +0000 Subject: [PATCH] Use just PAGE_READWRITE, not PAGE_READONLY | PAGE_READWRITE in the call to CreateFileMapping in utils.cc. The combination of two flags was illegal, and caused a crash that looks like ..\utils.cc(996): CreateFileMapping(), file 'testresume', length 103, mflags 000 00006: The parameter is incorrect. (87) The crash could be caused by resuming a scan with --resume on Windows. --- CHANGELOG | 9 +++++++++ utils.cc | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 9dc93bf7a..95c162764 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,5 +1,14 @@ # Nmap Changelog ($Id$); -*-text-*- +o Fixed a bug that prevented the --resume option from working on + Windows. A symptom of the bug was an error message that looks like + ..\utils.cc(996): CreateFileMapping(), file 'testresume', length 103, + mflags 000 + 00006: The parameter is incorrect. + (87) + when running "nmap --resume testresume". Rob Nicholls submitted the + fix. + o Zenmap uses -PN now instead of -P0. -P0 is still supported but -PN is recommended to avoid confusion with the -PO (protocol ping) option. jah (jah(a)zadkiel.plus.com) noticed this. diff --git a/utils.cc b/utils.cc index 059229806..a33c22057 100644 --- a/utils.cc +++ b/utils.cc @@ -974,7 +974,7 @@ char *mmapfile(char *fname, int *length, int openflags) } else { oflags = GENERIC_READ | GENERIC_WRITE; - mflags = PAGE_READONLY | PAGE_READWRITE; + mflags = PAGE_READWRITE; } fd = CreateFile (