commit | d1afb52fea006771c968c3f27b1598811fdf8824 | [log] [tgz] |
---|---|---|
author | that <github@that.at> | Thu Feb 23 23:05:59 2017 +0100 |
committer | that <github@that.at> | Thu Feb 23 23:05:59 2017 +0100 |
tree | d9e50c571a9ccdfe610c92b87fadaa1cfc7ecc17 | |
parent | 1b3fa22d7119993d05738ece094b53f176808a74 [diff] |
twrpDigest: don't crash when zip.md5 file is empty Change-Id: I14145b32c7993bb0cd236b2982ed00bc2c791282
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;