summaryrefslogtreecommitdiffstats
path: root/twrpDigest.cpp
diff options
context:
space:
mode:
authorbig biff <bigbiff@teamw.in>2017-03-01 01:10:24 +0100
committerGerrit Code Review <gerrit2@gerrit>2017-03-01 01:10:24 +0100
commit35b8a40810bd6c140940676239548ef9a07ee28c (patch)
tree1cac8f7b0cf070cd71f27b8237b21a37410f8bc5 /twrpDigest.cpp
parentMerge "Update Hungarian localization" into android-7.1 (diff)
parenttwrpDigest: don't crash when zip.md5 file is empty (diff)
downloadandroid_bootable_recovery-35b8a40810bd6c140940676239548ef9a07ee28c.tar
android_bootable_recovery-35b8a40810bd6c140940676239548ef9a07ee28c.tar.gz
android_bootable_recovery-35b8a40810bd6c140940676239548ef9a07ee28c.tar.bz2
android_bootable_recovery-35b8a40810bd6c140940676239548ef9a07ee28c.tar.lz
android_bootable_recovery-35b8a40810bd6c140940676239548ef9a07ee28c.tar.xz
android_bootable_recovery-35b8a40810bd6c140940676239548ef9a07ee28c.tar.zst
android_bootable_recovery-35b8a40810bd6c140940676239548ef9a07ee28c.zip
Diffstat (limited to 'twrpDigest.cpp')
-rw-r--r--twrpDigest.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/twrpDigest.cpp b/twrpDigest.cpp
index d1217cb6a..a9ba20a38 100644
--- a/twrpDigest.cpp
+++ b/twrpDigest.cpp
@@ -154,7 +154,7 @@ int twrpDigest::verify_md5digest(void) {
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;