summaryrefslogtreecommitdiffstats
path: root/mpi/mpi-config.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2017-06-12 06:58:17 -0700
committerKaz Kylheku <kaz@kylheku.com>2017-06-12 06:58:17 -0700
commit5e286b5ad7aaf2b7fdb4b7e39bcd145ffff291e3 (patch)
tree4be40b47f9e0f81ec582af71c0b91141a6bbd8f9 /mpi/mpi-config.h
parent598507145d7d7de4cf4e1408b9d16ef14fa42805 (diff)
downloadtxr-5e286b5ad7aaf2b7fdb4b7e39bcd145ffff291e3.tar.gz
txr-5e286b5ad7aaf2b7fdb4b7e39bcd145ffff291e3.tar.bz2
txr-5e286b5ad7aaf2b7fdb4b7e39bcd145ffff291e3.zip
lib: revamp overflow checks in vec operations.
* lib.c (vector): Bugfix: we are checking whether length + 2 is negative, not length. Check the original value, and simplify everything using check_mulloc. (list_vec, sub_vec): Use chk_xalloc just in case. There shouldn't be any overflow if the vector was constructed and manipulated properly. (replace_vec): Replace division-based oveflow check with a simple test that total + 2 doesn't overflow; then rely on chk_xalloc to do the multiplication overflow check.
Diffstat (limited to 'mpi/mpi-config.h')
0 files changed, 0 insertions, 0 deletions