ack/util
George Koehler 85fcbde22f Check LOI expressions to prevent a read after free.
CS eliminates outer expressions before inner ones, as `x * y * z`
before `x * y`.  It does this by reversing the order of expressions in
the code.  This almost always works, but it sometimes doesn't work if
a STI changes the value number of a LOI.  In code like `expr1 LOI
expr2 STI expr2 LOI`, CS might eliminate the inner `expr2` before the
outer `expr2 LOI`.  This caused a read after free because the
occurrence of `expr2 LOI` pointed to the eliminated lines of `expr2`.

This bug went unnoticed until my recent changes caused CS to crash
with a double free.  I did not get the crash in OpenBSD, but I saw the
crash in Travis, then David Given reproduced the crash in Linux.  See
the discussion in https://github.com/davidgiven/ack/pull/73
2018-03-12 20:58:31 -04:00
..
ack strcmp, strncmp are in <string.h> 2017-11-14 17:35:35 -05:00
amisc Rename RELOLIS to RELOPPC_LIS. 2017-10-18 15:39:31 -04:00
arch Stop using mktemp() --- on Haiku, it always generates the same filenames, 2017-08-06 13:22:05 +02:00
ass Distributions are a pain --- let's not bother any more. Instead, we just tag 2016-09-02 23:00:38 +02:00
build Run all tests, even the ones which fail, and emit a test summary right at the 2016-12-01 23:03:30 +01:00
byacc Stop using mktemp() --- on Haiku, it always generates the same filenames, 2017-08-06 13:22:05 +02:00
ceg Distributions are a pain --- let's not bother any more. Instead, we just tag 2016-09-02 23:00:38 +02:00
cgg Distributions are a pain --- let's not bother any more. Instead, we just tag 2016-09-02 23:00:38 +02:00
cmisc Check each format string in tabgen.c 2017-11-13 20:59:03 -05:00
cpp Distributions are a pain --- let's not bother any more. Instead, we just tag 2016-09-02 23:00:38 +02:00
ego Check LOI expressions to prevent a read after free. 2018-03-12 20:58:31 -04:00
flex Stop using mktemp() --- on Haiku, it always generates the same filenames, 2017-08-06 13:22:05 +02:00
grind Distributions are a pain --- let's not bother any more. Instead, we just tag 2016-09-02 23:00:38 +02:00
int Distributions are a pain --- let's not bother any more. Instead, we just tag 2016-09-02 23:00:38 +02:00
led Delete old "assert.h" files; use libc <assert.h>. 2017-11-09 22:22:13 -05:00
LLgen Merge pull request #69 from kernigh/kernigh-stdc 2017-11-19 12:00:40 +01:00
make Distributions are a pain --- let's not bother any more. Instead, we just tag 2016-09-02 23:00:38 +02:00
mcgg Restore an assignment deleted in commit 789f79b. 2017-11-07 23:52:52 -05:00
misc Use <stdarg.h> in util/misc/convert.c 2017-12-06 17:09:12 -05:00
ncgg strcmp, strncmp are in <string.h> 2017-11-14 17:35:35 -05:00
opt Delete old "assert.h" files; use libc <assert.h>. 2017-11-09 22:22:13 -05:00
shf Distributions are a pain --- let's not bother any more. Instead, we just tag 2016-09-02 23:00:38 +02:00
topgen strcmp, strncmp are in <string.h> 2017-11-14 17:35:35 -05:00