aboutsummaryrefslogtreecommitdiff
path: root/testsuite
diff options
context:
space:
mode:
authorBrian Foley <bpfoley@google.com>2019-09-05 10:53:21 +0200
committerDenys Vlasenko <vda.linux@googlemail.com>2019-10-21 16:54:40 +0200
commit2f3352682e3e0f62aca80c12e64d4509e48df465 (patch)
tree1574992fb1f7a7ee36d122d53d84ab6c8c1fe868 /testsuite
parent50ba92128b0a6472a3a85efaaa8ce3bfbda1bce5 (diff)
downloadbusybox-w32-2f3352682e3e0f62aca80c12e64d4509e48df465.tar.gz
busybox-w32-2f3352682e3e0f62aca80c12e64d4509e48df465.tar.bz2
busybox-w32-2f3352682e3e0f62aca80c12e64d4509e48df465.zip
dc: Parse error & fix out of bounds read in xc_program_printString
function old new delta xc_program_print 712 735 +23 Signed-off-by: Brian Foley <bpfoley@google.com> Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
Diffstat (limited to 'testsuite')
-rwxr-xr-xtestsuite/dc.tests20
1 files changed, 20 insertions, 0 deletions
diff --git a/testsuite/dc.tests b/testsuite/dc.tests
index 1fc13c201..361bc8459 100755
--- a/testsuite/dc.tests
+++ b/testsuite/dc.tests
@@ -59,6 +59,26 @@ testing "dc: x should work with strings created from a" \
59 "42\n" \ 59 "42\n" \
60 "" "" 60 "" ""
61 61
62testing "dc: p should print invalid escapes" \
63 "dc -e '[\q] p'" \
64 "\\q\n" \
65 "" ""
66
67testing "dc: p should print trailing backslashes" \
68 "dc -e '[q\] p'" \
69 "q\\\\\n" \
70 "" ""
71
72testing "dc: p should parse/print single backslashes" \
73 "dc -e '[\] p'" \
74 "\\\\\n" \
75 "" ""
76
77testing "dc: p should print single backslash strings" \
78 "dc -e '92 a p'" \
79 "\\\\\n" \
80 "" ""
81
62testing "dc read" \ 82testing "dc read" \
63 "dc -finput" \ 83 "dc -finput" \
64 "2\n9\n1\n" \ 84 "2\n9\n1\n" \