summaryrefslogtreecommitdiffstats
path: root/ffi.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2019-05-31 19:00:36 -0700
committerKaz Kylheku <kaz@kylheku.com>2019-05-31 19:00:36 -0700
commit59863eeb3e6d00c782063866d899a35f83b07ea5 (patch)
treed2b5691d736ce190732635a3d4267e9edf02d5f6 /ffi.c
parent39c8698842bc132cbc2f44aadb83f12efc3aa062 (diff)
downloadtxr-59863eeb3e6d00c782063866d899a35f83b07ea5.tar.gz
txr-59863eeb3e6d00c782063866d899a35f83b07ea5.tar.bz2
txr-59863eeb3e6d00c782063866d899a35f83b07ea5.zip
bugfix: list length: off-by-one error huge lists.
* lib.c (length_list, length_proper_list): Fix off-by-one bug when calculating lengths of lists that overflow the cnum type. Note that we will never see regular lists which hit this situation, because there are more values in the range [0, INT_PTR_MAX] then there are possible pointers in the system, However, lazy lists can be that long or longer, because as we calculate the length of a lazy list, the part we have already traversed can be garbage-collected under the right circumstances.
Diffstat (limited to 'ffi.c')
0 files changed, 0 insertions, 0 deletions