forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit851a0f8
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 parent972d4a0 commit851a0f8
1 file changed
+5
-0
lines changedLines changed: 5 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3494 | 3494 |
| |
3495 | 3495 |
| |
3496 | 3496 |
| |
| 3497 | + | |
| 3498 | + | |
| 3499 | + | |
| 3500 | + | |
| 3501 | + | |
3497 | 3502 |
| |
3498 | 3503 |
| |
3499 | 3504 |
| |
|
0 commit comments
Comments
(0)