]> git.ipfire.org Git - thirdparty/postgresql.git/commit
From: James Hughes <jamesh@interpath.com>
authorMarc G. Fournier <scrappy@hub.org>
Fri, 23 Jan 1998 19:22:24 +0000 (19:22 +0000)
committerMarc G. Fournier <scrappy@hub.org>
Fri, 23 Jan 1998 19:22:24 +0000 (19:22 +0000)
commitb34c8ec3ec8385043f7542bc886a13230d95ca14
treebb4e5ab23985c00e78ef1596b9ad61f3c17fc385
parentb8476a09fe83f83050a528bd9ca10d37fdf3a727
From: James Hughes <jamesh@interpath.com>

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.
src/bin/psql/psql.c