summaryrefslogtreecommitdiffstats
path: root/lib.c
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-06-12 06:46:10 -0700
committerKaz Kylheku <kaz@kylheku.com>2017-06-12 06:46:10 -0700
commit45ae26abca02ae71d46fd4baa2fba1a0b311e816 (patch)
tree855facabe2c2fd16954ef5ce5f20f5ee1c7276fe /lib.c
parent13265cb31f4f14e1c021929d7d4585c5588dcd9d (diff)
downloadtxr-45ae26abca02ae71d46fd4baa2fba1a0b311e816.tar.gz
txr-45ae26abca02ae71d46fd4baa2fba1a0b311e816.tar.bz2
txr-45ae26abca02ae71d46fd4baa2fba1a0b311e816.zip
ffi: fix carray multiplication overflow checks.
* ffi.c (carray_dup): Do size multiplication using unsigned type, then coerce back to signed. Check for overflow correctly by first testing result for negative, then doing division check. (carray_replace): Add check for negative size, which confirms overflow.
Diffstat (limited to 'lib.c')
0 files changed, 0 insertions, 0 deletions