commit | 35b8a40810bd6c140940676239548ef9a07ee28c | [log] [tgz] |
---|---|---|
author | big biff <bigbiff@teamw.in> | Wed Mar 01 01:10:24 2017 +0100 |
committer | Gerrit Code Review <gerrit2@gerrit> | Wed Mar 01 01:10:24 2017 +0100 |
tree | 1cac8f7b0cf070cd71f27b8237b21a37410f8bc5 | |
parent | ced41a4a551bcbd55258aaed659aa2a518247819 [diff] | |
parent | d1afb52fea006771c968c3f27b1598811fdf8824 [diff] |
Merge "twrpDigest: don't crash when zip.md5 file is empty" into android-7.1
diff --git a/twrpDigest.cpp b/twrpDigest.cpp index d1217cb..a9ba20a 100644 --- a/twrpDigest.cpp +++ b/twrpDigest.cpp
@@ -154,7 +154,7 @@ snprintf(hex, 3, "%02x", md5sum[i]); md5str += hex; } - if (tokens.at(0) != md5str) + if (tokens.empty() || tokens.at(0) != md5str) return MD5_MATCH_FAIL; return MD5_OK;