hopefully final fix for redir_stack and silence more output
authorHanno <hanno@gentoo.org>
Wed, 1 Oct 2014 19:17:45 +0000 (21:17 +0200)
committerHanno <hanno@gentoo.org>
Wed, 1 Oct 2014 19:17:45 +0000 (21:17 +0200)
bashcheck

index 9c45e15..4bc3664 100755 (executable)
--- a/bashcheck
+++ b/bashcheck
@@ -22,9 +22,9 @@ else
        echo -e "\033[92mNot vulnerable to CVE-2014-7169 (taviso bug)\033[39m"
 fi
 
-out=$($bash -c "true $(printf '<<EOF %.0s' {1..80})" 2>1)
+$($bash -c "true $(printf '<<EOF %.0s' {1..80})" 2>/tmp/bashcheck.tmp)
 ret=$?
-echo "$out"|grep -q AddressSanitizer
+grep -q AddressSanitizer /tmp/bashcheck.tmp
 if [ $? == 0 ] || [ $ret == 139 ]; then
        echo -e "\033[91mVulnerable to CVE-2014-7186 (redir_stack bug)\033[39m"
 else
@@ -39,7 +39,7 @@ else
        echo -e "\033[96mTest for CVE-2014-7187 not reliable without address sanitizer\033[39m"
 fi
 
-$($bash -c "f(){ x(){ _;};x(){ _;}<<a;}")
+$($bash -c "f(){ x(){ _;};x(){ _;}<<a;}" 2>/dev/null)
 if [ $? != 0 ]; then
        echo -e "\033[91mVulnerable to CVE-2014-6277 (lcamtuf bug #1) [no patch]\033[39m"
 else