mirror of
https://anongit.gentoo.org/git/repo/gentoo.git
synced 2025-07-22 06:57:59 +02:00
Add several missing dependencies Add missing dev-qt/qtbase:6= and media-sound/fluidsynth slot ops Move several RDEPEND(-only) -> (COMMON_)DEPEND Move kde-frameworks/extra-cmake-modules to BDEPEND See also: https://github.com/flathub/net._86box._86Box/issues/18 Bug: https://bugs.gentoo.org/953992 Signed-off-by: Andreas Sturmlechner <asturm@gentoo.org>
40 lines
1.9 KiB
Diff
40 lines
1.9 KiB
Diff
From 6b05602ea4d1593edf8d0fff17e733b182e94637 Mon Sep 17 00:00:00 2001
|
|
From: OBattler <oubattler@gmail.com>
|
|
Date: Sun, 5 Jan 2025 22:35:50 +0100
|
|
Subject: [PATCH] QT: Increase buffer size and improve sanity checking when
|
|
removing an image.
|
|
|
|
---
|
|
src/qt/qt_mediahistorymanager.cpp | 14 +++++++++-----
|
|
1 file changed, 9 insertions(+), 5 deletions(-)
|
|
|
|
diff --git a/src/qt/qt_mediahistorymanager.cpp b/src/qt/qt_mediahistorymanager.cpp
|
|
index 2acdc8e5bb..d548c0779c 100644
|
|
--- a/src/qt/qt_mediahistorymanager.cpp
|
|
+++ b/src/qt/qt_mediahistorymanager.cpp
|
|
@@ -336,16 +336,20 @@ MediaHistoryManager::removeMissingImages(device_index_list_t &device_history)
|
|
continue;
|
|
}
|
|
|
|
- char temp[MAX_IMAGE_PATH_LEN -1] = { 0 };
|
|
+ char temp[MAX_IMAGE_PATH_LEN * 2] = { 0 };
|
|
|
|
if (path_abs(checked_path.toUtf8().data())) {
|
|
if (checked_path.length() > (MAX_IMAGE_PATH_LEN - 1))
|
|
- fatal("removeMissingImages(): checked_path.length() > 2047\n");
|
|
+ fatal("removeMissingImages(): checked_path.length() > %i\n", MAX_IMAGE_PATH_LEN - 1);
|
|
else
|
|
snprintf(temp, (MAX_IMAGE_PATH_LEN - 1), "%s", checked_path.toUtf8().constData());
|
|
- } else
|
|
- snprintf(temp, (MAX_IMAGE_PATH_LEN - 1), "%s%s%s", usr_path,
|
|
- path_get_slash(usr_path), checked_path.toUtf8().constData());
|
|
+ } else {
|
|
+ if ((strlen(usr_path) + strlen(path_get_slash(usr_path)) + checked_path.length()) > (MAX_IMAGE_PATH_LEN - 1))
|
|
+ fatal("removeMissingImages(): Combined absolute path length > %i\n", MAX_IMAGE_PATH_LEN - 1);
|
|
+ else
|
|
+ snprintf(temp, (MAX_IMAGE_PATH_LEN - 1), "%s%s%s", usr_path,
|
|
+ path_get_slash(usr_path), checked_path.toUtf8().constData());
|
|
+ }
|
|
path_normalize(temp);
|
|
|
|
QString qstr = QString::fromUtf8(temp);
|