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;