Don't access pointers to freed storage in regex.c
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.
Showing with 15 additions and 36 deletions