forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitfbed54f
committed
Avoid reference to nonexistent array element in ExecInitAgg().
When considering an empty grouping set, we fetchedphasedata->eqfunctions[-1]. Because the eqfunctions array ispalloc'd, that would always be an aset pointer in released versions,and thus the code accidentally failed to malfunction (since it woulddo nothing unless it found a null pointer). Nonetheless this seemslike 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 GuoDiscussion:https://postgr.es/m/CAMbWs4-vZuuPOZsKOYnSAaPYGKhmacxhki+vpOKk0O7rymccXQ@mail.gmail.com1 parent1fbcb13 commitfbed54f
1 file changed
+5
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3486 | 3486 | | |
3487 | 3487 | | |
3488 | 3488 | | |
| 3489 | + | |
| 3490 | + | |
| 3491 | + | |
| 3492 | + | |
| 3493 | + | |
3489 | 3494 | | |
3490 | 3495 | | |
3491 | 3496 | | |
| |||
0 commit comments
Comments
(0)