aboutsummaryrefslogtreecommitdiffstats
path: root/epan/emem.c
diff options
context:
space:
mode:
authorJeff Morriss <jeff.morriss.ws@gmail.com>2012-09-10 15:18:17 +0000
committerJeff Morriss <jeff.morriss.ws@gmail.com>2012-09-10 15:18:17 +0000
commit17e7db3bcabca3387fd3d865710c299735122d5f (patch)
tree6a2e409544228dfa44350edd4fe5cc39f0b18810 /epan/emem.c
parente48357e7f344b8f48d01d6ca5c1331176c851296 (diff)
Attempt to fix https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5699
and https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=5979 : Don't cast the buffer address to int on Win32: a 64-bit address won't fit in an integer. svn path=/trunk/; revision=44844
Diffstat (limited to 'epan/emem.c')
-rw-r--r--epan/emem.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/epan/emem.c b/epan/emem.c
index 9a16e29c6e..dd7d59c06a 100644
--- a/epan/emem.c
+++ b/epan/emem.c
@@ -703,8 +703,8 @@ emem_create_chunk_gp(size_t size)
buf_end = npc->buf + size;
/* Align our guard pages on page-sized boundaries */
- prot1 = (char *) ((((int) npc->buf + pagesize - 1) / pagesize) * pagesize);
- prot2 = (char *) ((((int) buf_end - (1 * pagesize)) / pagesize) * pagesize);
+ prot1 = (char *) ((((long long) npc->buf + pagesize - 1) / pagesize) * pagesize);
+ prot2 = (char *) ((((long long) buf_end - (1 * pagesize)) / pagesize) * pagesize);
ret = VirtualProtect(prot1, pagesize, PAGE_NOACCESS, &oldprot);
g_assert(ret != 0 || versinfo.dwPlatformId == VER_PLATFORM_WIN32_WINDOWS);