• Marc G. Fournier's avatar
    From: James Hughes <jamesh@interpath.com> · b34c8ec3
    Marc G. Fournier authored
    This is a patch to fix crashes in psql when executing queries from
    an external file. The code also adds error checking to verify that
    memory for "query" was allocated. The conditional for the block of
    code was changed from "query == NULL" to "query_alloced == false".
    
    The conditional, "query == NULL", was never true. This prevented
    the memory being allocated for "query". A few lines later, an attempt
    to write to an un-allocated memory area generated a SIGSEGV causing
    the frontend to crash.
    b34c8ec3
psql.c 68 KB