File: upstream_3ac1505b_Fix-heap-buffer-overflow.patch

package info (click to toggle)
kf6-karchive 6.13.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 3,124 kB
  • sloc: cpp: 10,437; python: 37; sh: 14; makefile: 5
file content (26 lines) | stat: -rw-r--r-- 744 bytes parent folder | download
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