summaryrefslogtreecommitdiff
path: root/sys-apps/fwupd/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@koprulu.sector>2023-03-06 23:55:40 +0000
committerV3n3RiX <venerix@koprulu.sector>2023-03-06 23:55:40 +0000
commitf704f050bfdcc3bad4cd597edcce143ca6133848 (patch)
tree6609b8b496dac33c04e8d52c2d80580e46f15cf2 /sys-apps/fwupd/files
parent47223eb70974998c84966981d9e4fc2be27b3f8a (diff)
gentoo auto-resync : 06:03:2023 - 23:55:39
Diffstat (limited to 'sys-apps/fwupd/files')
-rw-r--r--sys-apps/fwupd/files/fwupd-1.8.11-empty_kernel_cmdline.patch19
1 files changed, 19 insertions, 0 deletions
diff --git a/sys-apps/fwupd/files/fwupd-1.8.11-empty_kernel_cmdline.patch b/sys-apps/fwupd/files/fwupd-1.8.11-empty_kernel_cmdline.patch
new file mode 100644
index 000000000000..42d5915397b8
--- /dev/null
+++ b/sys-apps/fwupd/files/fwupd-1.8.11-empty_kernel_cmdline.patch
@@ -0,0 +1,19 @@
+From 7e502cf7d3da00a978201455f3a3799ae4aded75 Mon Sep 17 00:00:00 2001
+From: Richard Hughes <richard@hughsie.com>
+Date: Mon, 6 Mar 2023 16:56:05 +0000
+Subject: [PATCH] Fix a critical warning when parsing an empty kernel cmdline
+
+Fix the bounds check so we never pass a bufsz of zero to fu_strsplit().
+
+Resolves: https://github.com/fwupd/fwupd/issues/5575
+--- a/libfwupdplugin/fu-kernel.c
++++ b/libfwupdplugin/fu-kernel.c
+@@ -253,7 +253,7 @@ fu_kernel_get_cmdline(GError **error)
+ if (!g_file_get_contents("/proc/cmdline", &buf, &bufsz, error))
+ return NULL;
+ hash = g_hash_table_new_full(g_str_hash, g_str_equal, g_free, g_free);
+- if (bufsz > 0) {
++ if (bufsz > 1) {
+ g_auto(GStrv) tokens = fu_strsplit(buf, bufsz - 1, " ", -1);
+ for (guint i = 0; tokens[i] != NULL; i++) {
+ g_auto(GStrv) kv = NULL;