summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBrian Carlstrom <bdc@google.com>2016-09-22 00:30:48 +0000
committerandroid-build-merger <android-build-merger@google.com>2016-09-22 00:30:48 +0000
commit355dab45c4518aebab6d8ee4d86f532aa0b3873f (patch)
tree20433f5877517be193e526bdb06ab96737235587
parent90cd710f3a602c0496281da69508a82006c337f8 (diff)
parentb743e03c9b8899e9ada9621420b6feed8291d94a (diff)
downloadexpat-355dab45c4518aebab6d8ee4d86f532aa0b3873f.tar.gz
Fix cast from pointer to integer of different size
am: b743e03c9b Change-Id: Ib42a068c6abcf4c984708dec61d23ecad29d39ed
-rw-r--r--lib/xmlparse.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/xmlparse.c b/lib/xmlparse.c
index e12853c6..0655e080 100644
--- a/lib/xmlparse.c
+++ b/lib/xmlparse.c
@@ -3,6 +3,7 @@
*/
#include <stddef.h>
+#include <stdint.h>
#include <string.h> /* memset(), memcpy() */
#include <assert.h>
#include <limits.h> /* UINT_MAX */
@@ -722,7 +723,7 @@ generate_hash_secret_salt(XML_Parser parser)
/* Process ID is 0 bits entropy if attacker has local access
* XML_Parser address is few bits of entropy if attacker has local access */
const unsigned long entropy =
- gather_time_entropy() ^ getpid() ^ (unsigned long)parser;
+ gather_time_entropy() ^ getpid() ^ (uintptr_t)parser;
/* Factors are 2^31-1 and 2^61-1 (Mersenne primes M31 and M61) */
if (sizeof(unsigned long) == 4) {