From cf32774b2492b729f322f7df1b68eda95eacb322 Mon Sep 17 00:00:00 2001 From: Stenzek Date: Sun, 22 Sep 2024 20:43:09 +1000 Subject: [PATCH] RegTest: Check size before hash --- scripts/check_regression_tests.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/scripts/check_regression_tests.py b/scripts/check_regression_tests.py index eaa32a992..7ed4af3e4 100644 --- a/scripts/check_regression_tests.py +++ b/scripts/check_regression_tests.py @@ -260,6 +260,9 @@ def write(line): def compare_frames(path1, path2): try: + if os.stat(path1).st_size != os.stat(path2).st_size: + return False + with open(path1, "rb") as f: hash1 = hashlib.md5(f.read()).digest() with open(path2, "rb") as f: