Commit 7076612
committed
Add integer overflow check to ap_escape_shell_cmd()
ap_escape_shell_cmd at line 1820 computes 2 * strlen(str) + 1
without checking for overflow. Same pattern as the URL escape
functions fixed in the previous commit. Add (APR_SIZE_MAX - 1) / 2
guard, consistent with ap_escape_html2's overflow protection.1 parent 53f4fbb commit 7076612
1 file changed
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1816 | 1816 | | |
1817 | 1817 | | |
1818 | 1818 | | |
| 1819 | + | |
1819 | 1820 | | |
1820 | | - | |
| 1821 | + | |
| 1822 | + | |
| 1823 | + | |
| 1824 | + | |
1821 | 1825 | | |
1822 | 1826 | | |
1823 | 1827 | | |
| |||
0 commit comments