diff options
| author | Noah Misch | 2019-07-01 00:34:17 +0000 |
|---|---|---|
| committer | Noah Misch | 2019-07-01 00:34:20 +0000 |
| commit | 4b85f20f948d885875a1e1b89979e627b86e6e64 (patch) | |
| tree | 218eca7bdfa2a0588848528ddb468438fef7f581 /src/include/pgtime.h | |
| parent | 05dc5f4767e1c5ed157b2870f05d57f3378302f4 (diff) | |
Don't read fields of a misaligned ExpandedObjectHeader or AnyArrayType.
UBSan complains about this. Instead, cast to a suitable type requiring
only 4-byte alignment. DatumGetAnyArrayP() already assumes one can cast
between AnyArrayType and ArrayType, so this doesn't introduce a new
assumption. Back-patch to 9.5, where AnyArrayType was introduced.
Reviewed by Tom Lane.
Discussion: https://postgr.es/m/20190629210334.GA1244217@rfd.leadboat.com
Diffstat (limited to 'src/include/pgtime.h')
0 files changed, 0 insertions, 0 deletions
