summaryrefslogtreecommitdiffstats
path: root/src/bplist.c
diff options
context:
space:
mode:
authorGravatar Wang Junjie2017-01-19 14:59:14 +0100
committerGravatar Nikias Bassen2017-01-19 14:59:14 +0100
commit26061aac4ec75e7a4469a9aab9a424716223e5c4 (patch)
tree1cdf14fdda9e825e133e3eefef8968c544fdc345 /src/bplist.c
parent82501db7920d231d763e7a263f2678f494dc754f (diff)
downloadlibplist-26061aac4ec75e7a4469a9aab9a424716223e5c4.tar.gz
libplist-26061aac4ec75e7a4469a9aab9a424716223e5c4.tar.bz2
bplist: Check for invalid offset_size in bplist trailer
Diffstat (limited to 'src/bplist.c')
-rw-r--r--src/bplist.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/bplist.c b/src/bplist.c
index 881c2c8..4a00683 100644
--- a/src/bplist.c
+++ b/src/bplist.c
@@ -733,6 +733,9 @@ PLIST_API void plist_from_bin(const char *plist_bin, uint32_t length, plist_t *
if (num_objects == 0)
return;
+ if (offset_size == 0)
+ return;
+
if (root_object >= num_objects)
return;