diff options
author | Wang Junjie | 2017-01-19 14:59:14 +0100 |
---|---|---|
committer | Nikias Bassen | 2017-01-19 14:59:14 +0100 |
commit | 26061aac4ec75e7a4469a9aab9a424716223e5c4 (patch) | |
tree | 1cdf14fdda9e825e133e3eefef8968c544fdc345 /src/bplist.c | |
parent | 82501db7920d231d763e7a263f2678f494dc754f (diff) | |
download | libplist-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.c | 3 |
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; |