forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitbcf188a
committed
Fix SPI_getvalue and SPI_getbinval to range-check the given attribute number
according to the TupleDesc's natts, not the number of physical columns in thetuple. The previous coding would do the wrong thing in cases where natts isdifferent from the tuple's column count: either incorrectly report error whenit should just treat the column as null, or actually crash due to indexing offthe end of the TupleDesc's attribute array. (The second case is probably notpossible in modern PG versions, due to more careful handling of inheritancecases than we once had. But it's still a clear lack of robustness here.)The incorrect error indication is ignored by all callers within the core PGdistribution, so this bug has no symptoms visible within the core code, butit might well be an issue for add-on packages. So patch all the way back.1 parentce0fb50 commitbcf188a
1 file changed
+3
-3
lines changedLines changed: 3 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
8 | 8 |
| |
9 | 9 |
| |
10 | 10 |
| |
11 |
| - | |
| 11 | + | |
12 | 12 |
| |
13 | 13 |
| |
14 | 14 |
| |
| |||
743 | 743 |
| |
744 | 744 |
| |
745 | 745 |
| |
746 |
| - | |
| 746 | + | |
747 | 747 |
| |
748 | 748 |
| |
749 | 749 |
| |
| |||
784 | 784 |
| |
785 | 785 |
| |
786 | 786 |
| |
787 |
| - | |
| 787 | + | |
788 | 788 |
| |
789 | 789 |
| |
790 | 790 |
| |
|
0 commit comments
Comments
(0)