Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit d1afb52f authored by that's avatar that
Browse files

twrpDigest: don't crash when zip.md5 file is empty

Change-Id: I14145b32c7993bb0cd236b2982ed00bc2c791282
parent 1b3fa22d
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;