summaryrefslogtreecommitdiffstats
path: root/fuzz/xplist-crashes/crash-a8b44e1f5be4f75f00a937016ec5405bce77a0f9
diff options
context:
space:
mode:
authorGravatar Nikias Bassen2018-12-23 02:38:20 +0100
committerGravatar Nikias Bassen2018-12-23 02:38:20 +0100
commit3f967317479acc4b98594b4b86a2787cbd2aa1f1 (patch)
treeb2510557f854f522c117d2e067f414d01a0cc3c1 /fuzz/xplist-crashes/crash-a8b44e1f5be4f75f00a937016ec5405bce77a0f9
parent92e5c858c246f3a01104f511c23217fd75c272f4 (diff)
downloadlibplist-3f967317479acc4b98594b4b86a2787cbd2aa1f1.tar.gz
libplist-3f967317479acc4b98594b4b86a2787cbd2aa1f1.tar.bz2
plist: Improve plist_dict_next_item() drastically by iterating on node list directly
As Xiao Deng pointed out in #131, plist_dict_next_item() was very inefficient. For each iteration, node_nth_child() was called with the iterator value, which would walk through the child node list on EVERY iteration. If the dictionary is large this makes things very slow. More than that, after reaching the key node the code was calling node_nth_child() AGAIN (with iterator value + 1) to reach the value node, which would walk through the node list once more. This commit changes the iterator to be a node_t pointer so that the iteration is done on the node list directly.
Diffstat (limited to 'fuzz/xplist-crashes/crash-a8b44e1f5be4f75f00a937016ec5405bce77a0f9')
0 files changed, 0 insertions, 0 deletions