summaryrefslogtreecommitdiffstats
path: root/unwind.h
diff options
context:
space:
mode:
authorKaz Kylheku <kaz@kylheku.com>2016-12-02 22:00:42 -0800
committerKaz Kylheku <kaz@kylheku.com>2016-12-02 22:00:42 -0800
commit0f6cf1bdb8407b7e003ca983145d3f67a6ca78dc (patch)
treef6775c6882d2a71dbc2115ee6a01b71c368523c9 /unwind.h
parent40b56cf6878999799fff36b7f8d719de8d196d58 (diff)
downloadtxr-0f6cf1bdb8407b7e003ca983145d3f67a6ca78dc.tar.gz
txr-0f6cf1bdb8407b7e003ca983145d3f67a6ca78dc.tar.bz2
txr-0f6cf1bdb8407b7e003ca983145d3f67a6ca78dc.zip
Harden processing of character escapes.
Weakness uncovered by fuzzing with AFL (fast) 2.30b. The failing test case is regex syntax like [\1111111...111abc], where the bad character escape allows an invalid, negatively valued character object to escape out of the parser into the system leading to an an out-of-bounds array access in the char set code in the regex compiler. * parser.l (num_esc): Make sure that an out-of-range character is mapped to zero. Set up a default value of zero for the return variable. If the character token has too many digits, don't pass them through strtol at all, which will produce a garbage value. Then in the final range check, actually replace the value with zero if it is out of range: issuing a diagnostic is not enough.
Diffstat (limited to 'unwind.h')
0 files changed, 0 insertions, 0 deletions