• Tom Lane's avatar
    Fix some possible low-memory failures in regexp compilation. · 8a0258c3
    Tom Lane authored
    newnfa() failed to set the regex error state when malloc() fails.
    Several places in regcomp.c failed to check for an error after calling
    subre().  Each of these mistakes could lead to null-pointer-dereference
    crashes in memory-starved backends.
    
    Report and patch by Andreas Seltenreich.  Back-patch to all branches.
    8a0258c3
regc_nfa.c 40.4 KB