From 27bc87985c4135f27bdcddd905baad3b62a3f03a Mon Sep 17 00:00:00 2001 From: Tom Lane Date: Sun, 15 Sep 2019 11:51:57 -0400 Subject: [PATCH] Fix bogus sizeof calculations. Noted by Coverity. Typo in 27cc7cd2b, so back-patch to v12 as that was. --- src/backend/executor/execMain.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/backend/executor/execMain.c b/src/backend/executor/execMain.c index d616ba361f..1438685536 100644 --- a/src/backend/executor/execMain.c +++ b/src/backend/executor/execMain.c @@ -2917,7 +2917,7 @@ EvalPlanQualStart(EPQState *epqstate, Plan *planTree) { Assert(epqstate->relsubs_done != NULL); memset(epqstate->relsubs_rowmark, 0, - sizeof(rtsize * sizeof(ExecAuxRowMark *))); + rtsize * sizeof(ExecAuxRowMark *)); memset(epqstate->relsubs_done, 0, rtsize * sizeof(bool)); } @@ -2971,7 +2971,7 @@ EvalPlanQualEnd(EPQState *epqstate) if (epqstate->tuple_table != NIL) { memset(epqstate->relsubs_slot, 0, - sizeof(rtsize * sizeof(TupleTableSlot *))); + rtsize * sizeof(TupleTableSlot *)); ExecResetTupleTable(epqstate->tuple_table, true); epqstate->tuple_table = NIL; } -- 2.40.0