Commit 7db8c3c
apparmor: replace sprintf with snprintf in aa_new_learning_profile
Replace unbounded sprintf() calls with snprintf() to prevent potential
buffer overflows in aa_new_learning_profile(). While the current code
works correctly, snprintf() is safer and follows secure coding best
practices. No functional changes.
Signed-off-by: Thorsten Blum <[email protected]>
Signed-off-by: John Johansen <[email protected]>1 parent 8f0b4cc commit 7db8c3c
1 file changed
Lines changed: 9 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
697 | 697 | | |
698 | 698 | | |
699 | 699 | | |
| 700 | + | |
700 | 701 | | |
701 | 702 | | |
702 | 703 | | |
703 | 704 | | |
704 | | - | |
705 | | - | |
| 705 | + | |
| 706 | + | |
706 | 707 | | |
707 | | - | |
| 708 | + | |
| 709 | + | |
708 | 710 | | |
709 | 711 | | |
710 | 712 | | |
711 | 713 | | |
712 | 714 | | |
713 | | - | |
| 715 | + | |
| 716 | + | |
714 | 717 | | |
715 | 718 | | |
716 | | - | |
717 | | - | |
| 719 | + | |
| 720 | + | |
718 | 721 | | |
719 | 722 | | |
720 | 723 | | |
| |||
0 commit comments