mirror of https://github.com/qt/qt5.git
Coin: check hash exists after calculation
When the catch all is hit the exit statement only returns from the case statement. Remove the exit statement. Check that some sha was returned, otherwise empty input sha will result in empty calculated sha, which causes false positive sha check. Pick-to: 6.7 Change-Id: Iddb9562cf7e12f695e21ca63b302c9217fc98aab Reviewed-by: Dimitrios Apostolou <jimis@qt.io>
This commit is contained in:
parent
02199c9f75
commit
137a747c58
|
@ -47,10 +47,10 @@ VerifyHash () {
|
|||
65) sha256sum "$file" ;;
|
||||
97) sha384sum "$file" ;;
|
||||
129) sha512sum "$file" ;;
|
||||
*) echo "FATAL! Unknown hash length: $hashLength" 1>&2 && exit 1 ;;
|
||||
*) echo "FATAL! Unknown hash length: $hashLength" 1>&2 ;;
|
||||
esac | cut -d ' ' -f 1`
|
||||
|
||||
if [ ! "$expectedHash" = "$hash" ]
|
||||
if [ -z $hash ] || [ ! "$expectedHash" = "$hash" ]
|
||||
then
|
||||
echo "FAIL! wrong file hash: $file $hash" 1>&2
|
||||
return 1
|
||||
|
|
Loading…
Reference in New Issue