• Paul Eggert's avatar
    Don't access pointers to freed storage in regex.c · b7f3a305
    Paul Eggert authored
    Remove __BOUNDED_POINTERS__ code, which does not work with
    -fcheck-pointer-bound and which has undefined behavior anyway.
    Problem found when trying to port to gcc -fcheck-pointer-bounds.
    (This code was removed from glibc and gnulib regex.c many years ago.)
    * src/regex.c (ELSE_EXTEND_BUFFER_HIGH_BOUND): Remove.
    (EXTEND_BUFFER): Use a more-portable approach that avoids
    undefined behavior due to inspecting pointers to freed storage.
regex.c 188 KB