Skip to content

Commit 561b35e

Browse files
committed
Return error if char *query is null in SPI_prepare()
1 parent 99048ac commit 561b35e

File tree

1 file changed

+1
-1
lines changed
  • src/backend/executor

1 file changed

+1
-1
lines changed

src/backend/executor/spi.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -229,7 +229,7 @@ SPI_prepare(char *src, int nargs, Oid * argtypes)
229229
{
230230
_SPI_plan *plan;
231231

232-
if (nargs < 0 || (nargs > 0 && argtypes == NULL))
232+
if (src == NULL || nargs < 0 || (nargs > 0 && argtypes == NULL))
233233
{
234234
SPI_result = SPI_ERROR_ARGUMENT;
235235
return (NULL);

0 commit comments

Comments
 (0)