- Notifications
You must be signed in to change notification settings - Fork5
Commit4c051c4
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 parent7cbd944 commit4c051c4
1 file changed
+12
-9
lines changedLines changed: 12 additions & 9 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
2570 | 2570 |
| |
2571 | 2571 |
| |
2572 | 2572 |
| |
2573 |
| - | |
2574 |
| - | |
| 2573 | + | |
2575 | 2574 |
| |
2576 | 2575 |
| |
2577 | 2576 |
| |
2578 | 2577 |
| |
2579 | 2578 |
| |
2580 | 2579 |
| |
| 2580 | + | |
| 2581 | + | |
| 2582 | + | |
2581 | 2583 |
| |
2582 | 2584 |
| |
2583 | 2585 |
| |
| |||
2591 | 2593 |
| |
2592 | 2594 |
| |
2593 | 2595 |
| |
| 2596 | + | |
| 2597 | + | |
2594 | 2598 |
| |
2595 | 2599 |
| |
2596 | 2600 |
| |
| |||
2607 | 2611 |
| |
2608 | 2612 |
| |
2609 | 2613 |
| |
2610 |
| - | |
2611 |
| - | |
2612 |
| - | |
2613 | 2614 |
| |
2614 | 2615 |
| |
2615 | 2616 |
| |
| |||
2734 | 2735 |
| |
2735 | 2736 |
| |
2736 | 2737 |
| |
2737 |
| - | |
2738 |
| - | |
2739 |
| - | |
2740 |
| - | |
| 2738 | + | |
| 2739 | + | |
| 2740 | + | |
| 2741 | + | |
| 2742 | + | |
| 2743 | + | |
2741 | 2744 |
| |
2742 | 2745 |
| |
2743 | 2746 |
| |
|
0 commit comments
Comments
(0)