diff options
author | Nikias Bassen <nikias@gmx.li> | 2017-02-05 01:59:30 +0100 |
---|---|---|
committer | Nikias Bassen <nikias@gmx.li> | 2017-02-05 01:59:30 +0100 |
commit | 2c44cd6e7d3b961dd237b74a24cbaa80b3efc7a9 (patch) | |
tree | 85b874de294d1bf942e77f9508ac6b366dd8f40d /src/bplist.c | |
parent | c4dcf11b533b1b604216edb295e4f50a6085650f (diff) | |
download | libplist-2c44cd6e7d3b961dd237b74a24cbaa80b3efc7a9.tar.gz |
bplist: Make sure node index is smaller than number of objects
Diffstat (limited to 'src/bplist.c')
-rw-r--r-- | src/bplist.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/bplist.c b/src/bplist.c index d2a1ccb..d83f700 100644 --- a/src/bplist.c +++ b/src/bplist.c @@ -630,7 +630,7 @@ static plist_t parse_bin_node_at_index(struct bplist_data *bplist, uint32_t node plist_t plist = NULL; const char* idx_ptr = NULL; - if (node_index > bplist->num_objects) + if (node_index >= bplist->num_objects) return NULL; idx_ptr = bplist->offset_table + node_index * bplist->offset_size; |