summaryrefslogtreecommitdiffstats
path: root/src/opack.c
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2023-11-10 03:38:42 +0000
committerGravatar Nikias Bassen2023-11-10 04:53:38 +0100
commite314faac7850ebe9076b7cf5807f87ae6bd122fa (patch)
tree2960dc4b8eb949aa7ebc47ff65c311dabc373fbb /src/opack.c
parent214bafdde6a1434ead87357afe6cb41b32318495 (diff)
downloadlibimobiledevice-glue-e314faac7850ebe9076b7cf5807f87ae6bd122fa.tar.gz
libimobiledevice-glue-e314faac7850ebe9076b7cf5807f87ae6bd122fa.tar.bz2
opack: Fixed 32bit buffer overflow
Thanks to @cornejo for spotting this!
Diffstat (limited to 'src/opack.c')
-rw-r--r--src/opack.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/opack.c b/src/opack.c
index 9e7fa73..8892c26 100644
--- a/src/opack.c
+++ b/src/opack.c
@@ -206,7 +206,7 @@ static void opack_encode_node(plist_t node, struct char_buf* cbuf)
if (len >> 32) {
uint8_t blen = 0x94;
char_buf_append(cbuf, 1, &blen);
- uint32_t u64val = htole64(len);
+ uint64_t u64val = htole64(len);
char_buf_append(cbuf, 8, (unsigned char*)&u64val);
} else {
uint8_t blen = 0x93;