diff options
| author | 2017-02-05 01:59:30 +0100 | |
|---|---|---|
| committer | 2017-02-05 01:59:30 +0100 | |
| commit | 2c44cd6e7d3b961dd237b74a24cbaa80b3efc7a9 (patch) | |
| tree | 85b874de294d1bf942e77f9508ac6b366dd8f40d /src/bplist.c | |
| parent | c4dcf11b533b1b604216edb295e4f50a6085650f (diff) | |
| download | libplist-2c44cd6e7d3b961dd237b74a24cbaa80b3efc7a9.tar.gz libplist-2c44cd6e7d3b961dd237b74a24cbaa80b3efc7a9.tar.bz2 | |
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 | |||
| 630 | plist_t plist = NULL; | 630 | plist_t plist = NULL; |
| 631 | const char* idx_ptr = NULL; | 631 | const char* idx_ptr = NULL; |
| 632 | 632 | ||
| 633 | if (node_index > bplist->num_objects) | 633 | if (node_index >= bplist->num_objects) |
| 634 | return NULL; | 634 | return NULL; |
| 635 | 635 | ||
| 636 | idx_ptr = bplist->offset_table + node_index * bplist->offset_size; | 636 | idx_ptr = bplist->offset_table + node_index * bplist->offset_size; |
