mirror of
https://github.com/postgres/postgres.git
synced 2025-06-20 15:22:23 +03:00
Return error if char *query is null in SPI_prepare()
This commit is contained in:
@ -229,7 +229,7 @@ SPI_prepare(char *src, int nargs, Oid * argtypes)
|
|||||||
{
|
{
|
||||||
_SPI_plan *plan;
|
_SPI_plan *plan;
|
||||||
|
|
||||||
if (nargs < 0 || (nargs > 0 && argtypes == NULL))
|
if (src == NULL || nargs < 0 || (nargs > 0 && argtypes == NULL))
|
||||||
{
|
{
|
||||||
SPI_result = SPI_ERROR_ARGUMENT;
|
SPI_result = SPI_ERROR_ARGUMENT;
|
||||||
return (NULL);
|
return (NULL);
|
||||||
|
Reference in New Issue
Block a user