diff options
author | Florian Weimer <fweimer@redhat.com> | 2014-09-03 19:45:43 +0200 |
---|---|---|
committer | Florian Weimer <fweimer@redhat.com> | 2014-09-03 19:46:42 +0200 |
commit | 41488498b6d9440ee66ab033808cce8323bba7ac (patch) | |
tree | c71261df9fe5e8fbd7193181e7a1ca8160cfa6bb /iconvdata/run-iconv-test.sh | |
parent | a78b712d405b55405b425e9b1453745615483003 (diff) | |
download | glibc-41488498b6d9440ee66ab033808cce8323bba7ac.tar.gz glibc-41488498b6d9440ee66ab033808cce8323bba7ac.tar.xz glibc-41488498b6d9440ee66ab033808cce8323bba7ac.zip |
CVE-2014-6040: Crashes on invalid input in IBM gconv modules [BZ #17325]
These changes are based on the fix for BZ #14134 in commit 6e230d11837f3ae7b375ea69d7905f0d18eb79e5.
Diffstat (limited to 'iconvdata/run-iconv-test.sh')
-rwxr-xr-x | iconvdata/run-iconv-test.sh | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/iconvdata/run-iconv-test.sh b/iconvdata/run-iconv-test.sh index c98c92950d..5dfb69fe3a 100755 --- a/iconvdata/run-iconv-test.sh +++ b/iconvdata/run-iconv-test.sh @@ -184,6 +184,24 @@ while read utf8 from filename; do done < TESTS2 +# Check for crashes in decoders. +printf '\016\377\377\377\377\377\377\377' > $temp1 +for from in $iconv_modules ; do + echo $ac_n "test decoder $from $ac_c" + PROG=`eval echo $ICONV` + if $PROG < $temp1 >/dev/null 2>&1 ; then + : # fall through + else + status=$? + if test $status -gt 1 ; then + echo "/FAILED" + failed=1 + continue + fi + fi + echo "OK" +done + exit $failed # Local Variables: # mode:shell-script |