diff options
author | Tom Lane <tgl@sss.pgh.pa.us> | 2017-03-26 17:35:35 -0400 |
---|---|---|
committer | Tom Lane <tgl@sss.pgh.pa.us> | 2017-03-26 17:35:35 -0400 |
commit | 24fc43d40aad5f888f22af9a543113a168a08307 (patch) | |
tree | 91254bc862b3141dd39db78d902b2571ec8cbfe7 /src/backend/tcop/postgres.c | |
parent | 42a60aa7f2074d1e1cd48f278a00c7d1423f2fb6 (diff) | |
download | postgresql-24fc43d40aad5f888f22af9a543113a168a08307.tar.gz postgresql-24fc43d40aad5f888f22af9a543113a168a08307.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/tcop/postgres.c')
0 files changed, 0 insertions, 0 deletions