diff options
| -rw-r--r-- | src/bplist.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/bplist.c b/src/bplist.c index 987dd93..ec4ebe2 100644 --- a/src/bplist.c +++ b/src/bplist.c | |||
| @@ -742,17 +742,17 @@ static plist_t parse_bin_node_at_index(struct bplist_data *bplist, uint32_t node | |||
| 742 | /* store node_index for current recursion level */ | 742 | /* store node_index for current recursion level */ |
| 743 | if (ptr_array_size(bplist->used_indexes) < bplist->level+1) { | 743 | if (ptr_array_size(bplist->used_indexes) < bplist->level+1) { |
| 744 | while (ptr_array_size(bplist->used_indexes) < bplist->level+1) { | 744 | while (ptr_array_size(bplist->used_indexes) < bplist->level+1) { |
| 745 | ptr_array_add(bplist->used_indexes, node_index); | 745 | ptr_array_add(bplist->used_indexes, (void*)(uintptr_t)node_index); |
| 746 | } | 746 | } |
| 747 | } else { | 747 | } else { |
| 748 | ptr_array_set(bplist->used_indexes, node_index, bplist->level); | 748 | ptr_array_set(bplist->used_indexes, (void*)(uintptr_t)node_index, bplist->level); |
| 749 | } | 749 | } |
| 750 | 750 | ||
| 751 | /* recursion check */ | 751 | /* recursion check */ |
| 752 | if (bplist->level > 0) { | 752 | if (bplist->level > 0) { |
| 753 | for (i = bplist->level-1; i >= 0; i--) { | 753 | for (i = bplist->level-1; i >= 0; i--) { |
| 754 | uint32_t node_i = ptr_array_index(bplist->used_indexes, i); | 754 | uint32_t node_i = (uint32_t)(uintptr_t)ptr_array_index(bplist->used_indexes, i); |
| 755 | uint32_t node_level = ptr_array_index(bplist->used_indexes, bplist->level); | 755 | uint32_t node_level = (uint32_t)(uintptr_t)ptr_array_index(bplist->used_indexes, bplist->level); |
| 756 | if (node_i == node_level) { | 756 | if (node_i == node_level) { |
| 757 | PLIST_BIN_ERR("recursion detected in binary plist\n"); | 757 | PLIST_BIN_ERR("recursion detected in binary plist\n"); |
| 758 | return NULL; | 758 | return NULL; |
