forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit4ddfbd2
committed
Fix trim_array() for zero-dimensional array argument.
The code tried to access ARR_DIMS(v)[0] and ARR_LBOUND(v)[0]whether or not those values exist. This made the range checkon the "n" argument unstable --- it might or might not fail, andif it did it would report garbage for the allowed upper limit.These bogus accesses would probably annoy Valgrind, and if youwere very unlucky even lead to SIGSEGV.Report and fix by Martin Kalcher. Back-patch to v14 where thisfunction was added.Discussion:https://postgr.es/m/baaeb413-b8a8-4656-5757-ef347e5ec11f@aboutsource.net1 parentbfac42e commit4ddfbd2
File tree
3 files changed
+9
-3
lines changed- src
- backend/utils/adt
- test/regress
- expected
- sql
3 files changed
+9
-3
lines changedLines changed: 6 additions & 3 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
6839 | 6839 |
| |
6840 | 6840 |
| |
6841 | 6841 |
| |
6842 |
| - | |
| 6842 | + | |
6843 | 6843 |
| |
6844 | 6844 |
| |
6845 | 6845 |
| |
| |||
6859 | 6859 |
| |
6860 | 6860 |
| |
6861 | 6861 |
| |
6862 |
| - | |
6863 |
| - | |
| 6862 | + | |
| 6863 | + | |
| 6864 | + | |
| 6865 | + | |
| 6866 | + | |
6864 | 6867 |
| |
6865 | 6868 |
| |
6866 | 6869 |
| |
|
Lines changed: 2 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2445 | 2445 |
| |
2446 | 2446 |
| |
2447 | 2447 |
| |
| 2448 | + | |
| 2449 | + |
Lines changed: 1 addition & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
754 | 754 |
| |
755 | 755 |
| |
756 | 756 |
| |
| 757 | + |
0 commit comments
Comments
(0)