diff options
author | Brian Carlstrom <bdc@google.com> | 2016-09-21 10:34:18 -0700 |
---|---|---|
committer | gitbuildkicker <android-build@google.com> | 2016-09-27 11:32:37 -0700 |
commit | 7c3bd8110c65c52277c82ec0141bfdcf5b404dc2 (patch) | |
tree | cccadaa320084ca12a51563e35a11c847360c99c | |
parent | b0bec0fc55b670064a92bfa0a9cc36f54ebcddf2 (diff) | |
download | expat-7c3bd8110c65c52277c82ec0141bfdcf5b404dc2.tar.gz |
Fix cast from pointer to integer of different sizeandroid-7.0.0_r15nougat-release
Test: make
Bug: 29149404
Change-Id: I9be82ac4dfb430c8d7398aa69b100820957f6279
(cherry picked from commit 8caa27c2601e69bc404ff28fc4c5c39860d8d5bf)
(cherry picked from commit b743e03c9b8899e9ada9621420b6feed8291d94a)
-rw-r--r-- | lib/xmlparse.c | 3 |
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) { |