forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit19adcaf
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 parent58dcac0 commit19adcaf
1 file changed
+5
-0
lines changedLines changed: 5 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
3570 | 3570 |
| |
3571 | 3571 |
| |
3572 | 3572 |
| |
| 3573 | + | |
| 3574 | + | |
| 3575 | + | |
| 3576 | + | |
| 3577 | + | |
3573 | 3578 |
| |
3574 | 3579 |
| |
3575 | 3580 |
| |
|
0 commit comments
Comments
(0)