Commit 13cec01
committed
dhcpv6-ia: dhcpv6_log_ia_addr(): parse return of snprintf
snprintf() returns also in the failure case how many characters would have been required
to print the full string.
Check return of snprintf() and ensure the log_ctxt->buf_idx never points
outside of the given log_ctxt->buf.
Fixes: TOB-OWRT-5
Reported-by: Trail of Bits
Signed-off-by: Alexander Couzens <lynxis@fe80.eu>1 parent 13ef483 commit 13cec01
1 file changed
Lines changed: 13 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
824 | 824 | | |
825 | 825 | | |
826 | 826 | | |
| 827 | + | |
827 | 828 | | |
828 | 829 | | |
829 | 830 | | |
| |||
832 | 833 | | |
833 | 834 | | |
834 | 835 | | |
| 836 | + | |
| 837 | + | |
| 838 | + | |
| 839 | + | |
| 840 | + | |
835 | 841 | | |
836 | 842 | | |
837 | | - | |
838 | | - | |
| 843 | + | |
| 844 | + | |
| 845 | + | |
| 846 | + | |
| 847 | + | |
| 848 | + | |
| 849 | + | |
839 | 850 | | |
840 | 851 | | |
841 | 852 | | |
| |||
0 commit comments