summaryrefslogtreecommitdiff
path: root/PC/bdist_wininst
diff options
context:
space:
mode:
authorGregory P. Smith <greg@krypto.org>2013-03-23 16:05:36 -0700
committerGregory P. Smith <greg@krypto.org>2013-03-23 16:05:36 -0700
commitb803c6c4b8d6256ac3d69f07f28c5c7024c3d4f5 (patch)
tree8758eaf66c77333c75998de33053b5ce5384a0f5 /PC/bdist_wininst
parent93f756b274fb376d4c7fe589b1211acb49cea092 (diff)
downloadcpython-git-b803c6c4b8d6256ac3d69f07f28c5c7024c3d4f5.tar.gz
Fixes issue4653 - Correctly specify the buffer size to FormatMessageW and
correctly check for errors on two CreateFileMapping calls.
Diffstat (limited to 'PC/bdist_wininst')
-rw-r--r--PC/bdist_wininst/extract.c2
-rw-r--r--PC/bdist_wininst/install.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/PC/bdist_wininst/extract.c b/PC/bdist_wininst/extract.c
index c900f235fd..aec8eda2be 100644
--- a/PC/bdist_wininst/extract.c
+++ b/PC/bdist_wininst/extract.c
@@ -127,7 +127,7 @@ char *map_new_file(DWORD flags, char *filename,
CloseHandle(hFile);
- if (hFileMapping == INVALID_HANDLE_VALUE) {
+ if (hFileMapping == NULL) {
if (notify)
notify(SYSTEM_ERROR,
"CreateFileMapping (%s)", filename);
diff --git a/PC/bdist_wininst/install.c b/PC/bdist_wininst/install.c
index 771922cfd6..c11d45de22 100644
--- a/PC/bdist_wininst/install.c
+++ b/PC/bdist_wininst/install.c
@@ -1019,7 +1019,7 @@ static char *MapExistingFile(char *pathname, DWORD *psize)
NULL, PAGE_READONLY, 0, 0, NULL);
CloseHandle(hFile);
- if (hFileMapping == INVALID_HANDLE_VALUE)
+ if (hFileMapping == NULL)
return NULL;
data = MapViewOfFile(hFileMapping,