Commit c804c00
committed
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.1 parent 5674a25 commit c804c00
1 file changed
+12
-9
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2355 | 2355 | | |
2356 | 2356 | | |
2357 | 2357 | | |
2358 | | - | |
2359 | | - | |
| 2358 | + | |
2360 | 2359 | | |
2361 | 2360 | | |
2362 | 2361 | | |
2363 | 2362 | | |
2364 | 2363 | | |
2365 | 2364 | | |
| 2365 | + | |
| 2366 | + | |
| 2367 | + | |
2366 | 2368 | | |
2367 | 2369 | | |
2368 | 2370 | | |
| |||
2376 | 2378 | | |
2377 | 2379 | | |
2378 | 2380 | | |
| 2381 | + | |
| 2382 | + | |
2379 | 2383 | | |
2380 | 2384 | | |
2381 | 2385 | | |
| |||
2392 | 2396 | | |
2393 | 2397 | | |
2394 | 2398 | | |
2395 | | - | |
2396 | | - | |
2397 | | - | |
2398 | 2399 | | |
2399 | 2400 | | |
2400 | 2401 | | |
| |||
2429 | 2430 | | |
2430 | 2431 | | |
2431 | 2432 | | |
2432 | | - | |
2433 | | - | |
2434 | | - | |
2435 | | - | |
| 2433 | + | |
| 2434 | + | |
| 2435 | + | |
| 2436 | + | |
| 2437 | + | |
| 2438 | + | |
2436 | 2439 | | |
2437 | 2440 | | |
2438 | 2441 | | |
| |||
0 commit comments