aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBill Rassieur <rassb@google.com>2019-04-02 16:52:54 +0000
committerBill Rassieur <rassb@google.com>2019-04-02 16:52:54 +0000
commit266d02b7244beaad7c9547ddefa650225790cd4d (patch)
treed018a6acd32a9e3700bbe9d4d6b7b5cca533cf51
parent0f79533b608b0cfe28634ef8389931d8b6915e2b (diff)
parent68f26babcee9c1fa6fc6edaa6ccd8acbe781caab (diff)
downloadcn-cbor-266d02b7244beaad7c9547ddefa650225790cd4d.tar.gz
Merge master@5428150 into git_qt-dev.
Change-Id: Ia9a19cac4fe4af0f0e3e7fdf04e6d23bcfb33053 BUG: 129345239
-rw-r--r--src/cn-cbor.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cn-cbor.c b/src/cn-cbor.c
index a7677ae..8fadf73 100644
--- a/src/cn-cbor.c
+++ b/src/cn-cbor.c
@@ -52,7 +52,7 @@ static double decode_half(int half) {
/* Fix these if you can't do non-aligned reads */
#define ntoh8p(p) (*(unsigned char*)(p))
#define ntoh16p(p) (ntohs(*(unsigned short*)(p)))
-#define ntoh32p(p) (ntohl(*(unsigned long*)(p)))
+#define ntoh32p(p) (ntohl(*(uint32_t*)(p)))
static uint64_t ntoh64p(unsigned char *p) {
uint64_t ret = ntoh32p(p);
ret <<= 32;