forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commita45ed97
committed
Fix memory overrun when querying pg_stat_slru
pg_stat_get_slru() in pgstatfuncs.c would point to one element after theend of the array PgStat_SLRUStats when finishing to scan its entries.This had no direct consequences as no data from the extra memory areawas read, but static analyzers would rightfully complain here. So let'sbe clean.While on it, this adds one regression test in the area reserved forsystem views.Reported-by: Alexander Kozhemyakin, via AddressSanitizerAuthor: Kyotaro HoriguchiDiscussion:https://postgr.es/m/17280-37da556e86032070@postgresql.orgBackpatch-through: 131 parent3354746 commita45ed97
File tree
3 files changed
+12
-1
lines changed- src
- backend/utils/adt
- test/regress
- expected
- sql
3 files changed
+12
-1
lines changedLines changed: 2 additions & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1911 | 1911 |
| |
1912 | 1912 |
| |
1913 | 1913 |
| |
1914 |
| - | |
| 1914 | + | |
1915 | 1915 |
| |
1916 | 1916 |
| |
1917 | 1917 |
| |
1918 | 1918 |
| |
1919 | 1919 |
| |
1920 | 1920 |
| |
1921 | 1921 |
| |
| 1922 | + | |
1922 | 1923 |
| |
1923 | 1924 |
| |
1924 | 1925 |
| |
|
Lines changed: 7 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
76 | 76 |
| |
77 | 77 |
| |
78 | 78 |
| |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
79 | 86 |
| |
80 | 87 |
| |
81 | 88 |
| |
|
Lines changed: 3 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
37 | 37 |
| |
38 | 38 |
| |
39 | 39 |
| |
| 40 | + | |
| 41 | + | |
| 42 | + | |
40 | 43 |
| |
41 | 44 |
| |
42 | 45 |
| |
|
0 commit comments
Comments
(0)