diff options
author | Kaz Kylheku <kaz@kylheku.com> | 2017-06-18 07:56:04 -0700 |
---|---|---|
committer | Kaz Kylheku <kaz@kylheku.com> | 2017-06-18 10:14:34 -0700 |
commit | b97ffb72390bb8da611bf201bf4052d9ee8e850e (patch) | |
tree | 4ff9b8531d9fe3e6acaa0fe56d1e0d9666207e6b /socket.h | |
parent | cf5f21c8e7c54f0053c223e9ae6490b71d7314d3 (diff) | |
download | txr-b97ffb72390bb8da611bf201bf4052d9ee8e850e.tar.gz txr-b97ffb72390bb8da611bf201bf4052d9ee8e850e.tar.bz2 txr-b97ffb72390bb8da611bf201bf4052d9ee8e850e.zip |
mpi: avoid OOB pointer decr in two descending loops.
* mpi.c (s_mp_cmp): Rewrite loop as a for with
a bottom test, and the increments in the usual place.
ap and bp aren't decremented if the index is zero.
Ironic to fix this, given that we march through the
stack in the garbage collector.
(s_mp_ispow2): Similar restructuring, with an additional
guard around ix being set up to descend from the
second-to-last digit.
Diffstat (limited to 'socket.h')
0 files changed, 0 insertions, 0 deletions