Re: [HACKERS] Dereferenced pointer in tablesample.c

2015-06-30 Thread Tom Lane
Petr Jelinek writes: > On 2015-06-30 09:10, Michael Paquier wrote: >> If the expression argstate is NULL when calling ExecInitExpr(), argstate >> is going to be NULL and dereferenced afterwards, see execQual.c for more >> details. Hence I think that the patch attached should be applied. Thoughts?

Re: [HACKERS] Dereferenced pointer in tablesample.c

2015-06-30 Thread Petr Jelinek
On 2015-06-30 09:10, Michael Paquier wrote: Hi all, (Petr in CC) Coverity is complaining about the following pointer dereference in tablesample_init@tablesample.c: + ExprState *argstate = ExecInitExpr(argexpr, (PlanState *) scanstate); + + if (argstate == NULL) +

[HACKERS] Dereferenced pointer in tablesample.c

2015-06-30 Thread Michael Paquier
Hi all, (Petr in CC) Coverity is complaining about the following pointer dereference in tablesample_init@tablesample.c: + ExprState *argstate = ExecInitExpr(argexpr, (PlanState *) scanstate); + + if (argstate == NULL) + { + fcinfo.ar