forked frompostgres/postgres
- Notifications
You must be signed in to change notification settings - Fork6
Commit3455ddb
committed
Fix unportable disregard of alignment requirements in RADIUS code.
The compiler is entitled to store a char[] local variable with noparticular alignment requirement. Our RADIUS code cavalierly took sucha local variable and cast its address to a struct type that does havealignment requirements. On an alignment-picky machine this would leadto bus errors. To fix, declare the local variable honestly, and thencast its address to char * for use in the I/O calls.Given the lack of field complaints, there must be very few if anypeople 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 parente0e1ef4 commit3455ddb
1 file changed
+12
-9
lines changedLines changed: 12 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2384 | 2384 |
| |
2385 | 2385 |
| |
2386 | 2386 |
| |
2387 |
| - | |
2388 |
| - | |
| 2387 | + | |
2389 | 2388 |
| |
2390 | 2389 |
| |
2391 | 2390 |
| |
2392 | 2391 |
| |
2393 | 2392 |
| |
| 2393 | + | |
| 2394 | + | |
| 2395 | + | |
2394 | 2396 |
| |
2395 | 2397 |
| |
2396 | 2398 |
| |
| |||
2404 | 2406 |
| |
2405 | 2407 |
| |
2406 | 2408 |
| |
| 2409 | + | |
| 2410 | + | |
2407 | 2411 |
| |
2408 | 2412 |
| |
2409 | 2413 |
| |
| |||
2420 | 2424 |
| |
2421 | 2425 |
| |
2422 | 2426 |
| |
2423 |
| - | |
2424 |
| - | |
2425 |
| - | |
2426 | 2427 |
| |
2427 | 2428 |
| |
2428 | 2429 |
| |
| |||
2458 | 2459 |
| |
2459 | 2460 |
| |
2460 | 2461 |
| |
2461 |
| - | |
2462 |
| - | |
2463 |
| - | |
2464 |
| - | |
| 2462 | + | |
| 2463 | + | |
| 2464 | + | |
| 2465 | + | |
| 2466 | + | |
| 2467 | + | |
2465 | 2468 |
| |
2466 | 2469 |
| |
2467 | 2470 |
| |
|
0 commit comments
Comments
(0)