aboutsummaryrefslogtreecommitdiff
path: root/src/backend/access/transam/xloginsert.c
diff options
context:
space:
mode:
authorTom Lane <tgl@sss.pgh.pa.us>2017-03-26 17:35:35 -0400
committerTom Lane <tgl@sss.pgh.pa.us>2017-03-26 17:35:35 -0400
commitc804c00d38f6a848f0d7e57a05ea5468fc5762b2 (patch)
treeed77860bee1d1cc34979f455ee99b751f816cdf0 /src/backend/access/transam/xloginsert.c
parent5674a258fd7e6eb496a4e91b0907077dfa7ee336 (diff)
downloadpostgresql-c804c00d38f6a848f0d7e57a05ea5468fc5762b2.tar.gz
postgresql-c804c00d38f6a848f0d7e57a05ea5468fc5762b2.zip
Fix unportable disregard of alignment requirements in RADIUS code.
The compiler is entitled to store a char[] local variable with no particular alignment requirement. Our RADIUS code cavalierly took such a local variable and cast its address to a struct type that does have alignment requirements. On an alignment-picky machine this would lead to bus errors. To fix, declare the local variable honestly, and then cast its address to char * for use in the I/O calls. Given the lack of field complaints, there must be very few if any people affected; but nonetheless this is a clear portability issue, so back-patch to all supported branches. Noted while looking at a Coverity complaint in the same code.
Diffstat (limited to 'src/backend/access/transam/xloginsert.c')
0 files changed, 0 insertions, 0 deletions