Return error if char *query is null in SPI_prepare()

This commit is contained in:
Vadim B. Mikheev 1997-09-26 13:57:39 +00:00
parent 99048aca00
commit 561b35e556
1 changed files with 1 additions and 1 deletions

View File

@ -229,7 +229,7 @@ SPI_prepare(char *src, int nargs, Oid * argtypes)
{
_SPI_plan *plan;
if (nargs < 0 || (nargs > 0 && argtypes == NULL))
if (src == NULL || nargs < 0 || (nargs > 0 && argtypes == NULL))
{
SPI_result = SPI_ERROR_ARGUMENT;
return (NULL);