From: Marc G. Fournier Date: Thu, 24 Oct 1996 06:33:31 +0000 (+0000) Subject: Fixes: X-Git-Tag: PG95-1_09~16 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=82a4b0f225af03d99318e63951e1ea3ba08f74b7;p=postgresql Fixes: It's bug in nodeAgg.c on lines 241, 242: null_array = malloc(nagg); for (i=0;inatts elements (tupType->natts > nagg in your case). Patch follows and it's very simple. VAdim --- diff --git a/src/backend/executor/nodeAgg.c b/src/backend/executor/nodeAgg.c index ee187367c7..94764bfa3a 100644 --- a/src/backend/executor/nodeAgg.c +++ b/src/backend/executor/nodeAgg.c @@ -238,8 +238,8 @@ ExecAgg(Agg *node) tupValue = projInfo->pi_tupValue; /* initially, set all the values to NULL */ - null_array = malloc(nagg); - for (i=0;inatts); + for (i=0;inatts;i++) null_array[i] = 'n'; oneTuple = heap_formtuple(tupType, tupValue, null_array); free(null_array);