diff options
author | Gregory P. Smith <greg@krypto.org> | 2013-03-23 23:06:06 (GMT) |
---|---|---|
committer | Gregory P. Smith <greg@krypto.org> | 2013-03-23 23:06:06 (GMT) |
commit | d6f1d1647bce43b8c0d4cb1ba6d9c3004b3e357d (patch) | |
tree | 560c2bada073087b8bd4609f25383e542d611243 /PC | |
parent | 23c31d51928f82430fe5f0f39ca2141534d3a8bb (diff) | |
parent | b803c6c4b8d6256ac3d69f07f28c5c7024c3d4f5 (diff) | |
download | cpython-d6f1d1647bce43b8c0d4cb1ba6d9c3004b3e357d.zip cpython-d6f1d1647bce43b8c0d4cb1ba6d9c3004b3e357d.tar.gz cpython-d6f1d1647bce43b8c0d4cb1ba6d9c3004b3e357d.tar.bz2 |
Fixes issue4653 - Correctly specify the buffer size to FormatMessageW and
correctly check for errors on two CreateFileMapping calls.
Diffstat (limited to 'PC')
-rw-r--r-- | PC/bdist_wininst/extract.c | 2 | ||||
-rw-r--r-- | PC/bdist_wininst/install.c | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/PC/bdist_wininst/extract.c b/PC/bdist_wininst/extract.c index c900f23..aec8eda 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 771922c..c11d45d 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, |