aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorJonathan Wakely <jwakely@redhat.com>2022-08-22 15:16:16 +0100
committerJonathan Wakely <jwakely@redhat.com>2022-08-22 22:52:24 +0100
commit1b09eea33f2bf9d1eae73b25cc25efb05ea1dc3f (patch)
tree13ab4879e18170f3920e84ce931e44a006f38e84 /gcc
parent990124c35cd60cd23e0b70fc84cfb75311e80276 (diff)
downloadgcc-1b09eea33f2bf9d1eae73b25cc25efb05ea1dc3f.zip
gcc-1b09eea33f2bf9d1eae73b25cc25efb05ea1dc3f.tar.gz
gcc-1b09eea33f2bf9d1eae73b25cc25efb05ea1dc3f.tar.bz2
libstdc++: Check for overflow in regex back-reference [PR106607]
Currently we fail to notice integer overflow when parsing a back-reference expression, or when converting the parsed result from long to int. This changes the result to be int, so no conversion is needed, and uses the overflow-checking built-ins to detect an out-of-range back-reference. libstdc++-v3/ChangeLog: PR libstdc++/106607 * include/bits/regex_compiler.tcc (_Compiler::_M_cur_int_value): Use built-ins to check for integer overflow in back-reference number. * testsuite/28_regex/basic_regex/106607.cc: New test.
Diffstat (limited to 'gcc')
0 files changed, 0 insertions, 0 deletions