summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2014-02-06 13:36:32 +0100
committerGravatar Nikias Bassen2014-02-06 13:36:32 +0100
commitce2a16c9bf6fc6cc2d0ae1873078a864285de8f5 (patch)
tree7ddc0544a9f75be4cf75a1900c294e9b8c0ef551
parenta610172854aa39998d5b2cbefd42ce0cfd6a8cb4 (diff)
downloadlibplist-ce2a16c9bf6fc6cc2d0ae1873078a864285de8f5.tar.gz
libplist-ce2a16c9bf6fc6cc2d0ae1873078a864285de8f5.tar.bz2
bplist: prevent segmentation fault in plist_from_bin()
-rw-r--r--src/bplist.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/bplist.c b/src/bplist.c
index b9f2483..523d0fe 100644
--- a/src/bplist.c
+++ b/src/bplist.c
@@ -655,6 +655,9 @@ void plist_from_bin(const char *plist_bin, uint32_t length, plist_t * plist)
{
plist_data_t data = plist_get_data(nodeslist[i]);
+ if (!data) {
+ break;
+ }
switch (data->type)
{