diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2019-10-01 06:37:24 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2019-10-01 06:37:24 -0700 |
commit | 415bf7e8ee1a89e6a7f8c0ffc3e941f5ba232658 (patch) | |
tree | db7cd4112a5431e3a543bfa2e090c65b67a644b0 /share | |
parent | 7098518a9bc43378afb5cbf599a074775c1d1d55 (diff) | |
download | txr-415bf7e8ee1a89e6a7f8c0ffc3e941f5ba232658.tar.gz txr-415bf7e8ee1a89e6a7f8c0ffc3e941f5ba232658.tar.bz2 txr-415bf7e8ee1a89e6a7f8c0ffc3e941f5ba232658.zip |
tree: crash when root is to be replaced.
* tree.c (tr_insert): When the inserted key matches the root
node, then there is nothing in ti->path and ti->depth is zero.
We are accessing ti->path[-1] to get a root node. We must
test for zero depth and install the new node as the tree root
in that case.
Diffstat (limited to 'share')
0 files changed, 0 insertions, 0 deletions