diff options
author | Ulf Lamping <ulf.lamping@web.de> | 2006-05-17 09:28:14 +0000 |
---|---|---|
committer | Ulf Lamping <ulf.lamping@web.de> | 2006-05-17 09:28:14 +0000 |
commit | 1c69907dcd6dc3561a1b49ef1e4b1f1796f63876 (patch) | |
tree | 6c790987d7a920be015b0d8522483079722d3ca9 | |
parent | 6217c69fdda83667afbcca7f90527ef4d09a5080 (diff) |
attempt to fix #915:
if the GetVersionEx() call fails, force the dwPlatformId to VER_PLATFORM_WIN32_WINDOWS so the return value from VirtualProtect() won't trigger an assert.
svn path=/trunk/; revision=18178
-rw-r--r-- | epan/emem.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/epan/emem.c b/epan/emem.c index c3f88d4445..c1f4ff294f 100644 --- a/epan/emem.c +++ b/epan/emem.c @@ -205,14 +205,18 @@ ep_init_chunk(void) pagesize = sysinfo.dwPageSize; versinfo.dwOSVersionInfoSize = sizeof(versinfo); - GetVersionEx(&versinfo); + if( !GetVersionEx(&versinfo) ) { + /* the GetVersionEx() call may fail on some older Win95/98 systems */ + /* force the id so we don't care about VirtualProtect() return values */ + versinfo.dwPlatformId = VER_PLATFORM_WIN32_WINDOWS; + } #elif defined(USE_GUARD_PAGES) pagesize = sysconf(_SC_PAGESIZE); #endif /* _WIN32 / USE_GUARD_PAGES */ #endif /* SE_DEBUG_FREE */ +} -} /* Initialize the capture-lifetime memory allocation pool. * This function should be called only once when Ethereal or Tethereal starts * up. |