forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commitcd9d489
committed
Don't read fields of a misaligned ExpandedObjectHeader or AnyArrayType.
UBSan complains about this. Instead, cast to a suitable type requiringonly 4-byte alignment. DatumGetAnyArrayP() already assumes one can castbetween AnyArrayType and ArrayType, so this doesn't introduce a newassumption. Back-patch to 9.5, where AnyArrayType was introduced.Reviewed by Tom Lane.Discussion:https://postgr.es/m/20190629210334.GA1244217@rfd.leadboat.com1 parenta1637ca commitcd9d489
File tree
4 files changed
+17
-10
lines changed- src
- backend/utils/adt
- include/utils
4 files changed
+17
-10
lines changedLines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
4108 | 4108 |
| |
4109 | 4109 |
| |
4110 | 4110 |
| |
4111 |
| - | |
| 4111 | + | |
4112 | 4112 |
| |
4113 | 4113 |
| |
4114 | 4114 |
| |
|
Lines changed: 13 additions & 6 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
153 | 153 |
| |
154 | 154 |
| |
155 | 155 |
| |
156 |
| - | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
157 | 160 |
| |
158 | 161 |
| |
159 | 162 |
| |
| |||
307 | 310 |
| |
308 | 311 |
| |
309 | 312 |
| |
310 |
| - | |
| 313 | + | |
| 314 | + | |
311 | 315 |
| |
312 | 316 |
| |
313 | 317 |
| |
314 |
| - | |
| 318 | + | |
315 | 319 |
| |
316 |
| - | |
| 320 | + | |
| 321 | + | |
317 | 322 |
| |
318 |
| - | |
| 323 | + | |
| 324 | + | |
319 | 325 |
| |
320 |
| - | |
| 326 | + | |
| 327 | + | |
321 | 328 |
| |
322 | 329 |
| |
323 | 330 |
| |
|
Lines changed: 2 additions & 2 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
71 | 71 |
| |
72 | 72 |
| |
73 | 73 |
| |
74 |
| - | |
75 |
| - | |
| 74 | + | |
| 75 | + | |
76 | 76 |
| |
77 | 77 |
| |
78 | 78 |
| |
|
Lines changed: 1 addition & 1 deletion
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
126 | 126 |
| |
127 | 127 |
| |
128 | 128 |
| |
129 |
| - | |
| 129 | + | |
130 | 130 |
| |
131 | 131 |
| |
132 | 132 |
| |
|
0 commit comments
Comments
(0)