1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
|
From 3ac1505b71e4d8a895dff640525a58b9749c7fe1 Mon Sep 17 00:00:00 2001
From: Albert Astals Cid <aacid@kde.org>
Date: Tue, 15 Apr 2025 00:57:19 +0200
Subject: [PATCH] Fix heap buffer overflow
---
src/k7zip.cpp | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/src/k7zip.cpp b/src/k7zip.cpp
index 5ae9c7ab..e04814c1 100644
--- a/src/k7zip.cpp
+++ b/src/k7zip.cpp
@@ -761,8 +761,7 @@ void K7Zip::K7ZipPrivate::readHashDigests(int numItems, QList<bool> &digestsDefi
for (int i = 0; i < numItems; i++) {
quint32 crc = 0;
if (digestsDefined[i]) {
- crc = GetUi32(buffer + pos);
- pos += 4;
+ crc = readUInt32();
}
digests.append(crc);
}
--
GitLab
|