summaryrefslogtreecommitdiff
path: root/src/tools/git-external-diff
diff options
context:
space:
mode:
authorTom Lane2023-01-02 21:17:00 +0000
committerTom Lane2023-01-02 21:17:00 +0000
commit982b9b1eba8d809cd677009d15ca045cea890c69 (patch)
tree112bee6ffbb81d826e445141e1b5eb92f9b42821 /src/tools/git-external-diff
parentef3de5557687bdb60ab1a810c85a27094450f529 (diff)
Avoid reference to nonexistent array element in ExecInitAgg().
When considering an empty grouping set, we fetched phasedata->eqfunctions[-1]. Because the eqfunctions array is palloc'd, that would always be an aset pointer in released versions, and thus the code accidentally failed to malfunction (since it would do nothing unless it found a null pointer). Nonetheless this seems like trouble waiting to happen, so add a check for length == 0. It's depressing that our valgrind testing did not catch this. Maybe we should reconsider the choice to not mark that word NOACCESS? Richard Guo Discussion: https://postgr.es/m/CAMbWs4-vZuuPOZsKOYnSAaPYGKhmacxhki+vpOKk0O7rymccXQ@mail.gmail.com
Diffstat (limited to 'src/tools/git-external-diff')
0 files changed, 0 insertions, 0 deletions