Commit 561b35e5 authored by Vadim B. Mikheev's avatar Vadim B. Mikheev

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

parent 99048aca
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment