Script 'mail_helper' called by obssrc
Hello community,

here is the log from the commit of package dtc for openSUSE:Factory checked in 
at 2026-01-28 15:05:19
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/dtc (Old)
 and      /work/SRC/openSUSE:Factory/.dtc.new.1928 (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "dtc"

Wed Jan 28 15:05:19 2026 rev:44 rq:1329358 version:1.7.2

Changes:
--------
--- /work/SRC/openSUSE:Factory/dtc/dtc.changes  2025-02-11 21:21:25.430314083 
+0100
+++ /work/SRC/openSUSE:Factory/.dtc.new.1928/dtc.changes        2026-01-28 
15:05:24.189644697 +0100
@@ -1,0 +2,5 @@
+Mon Jan 26 18:43:11 UTC 2026 - Dirk Müller <[email protected]>
+
+- add 9a1c801a1a3c102bf95c5339c9e985b26b823a21.patch (bsc#1257254)
+
+-------------------------------------------------------------------

New:
----
  9a1c801a1a3c102bf95c5339c9e985b26b823a21.patch

----------(New B)----------
  New:
- add 9a1c801a1a3c102bf95c5339c9e985b26b823a21.patch (bsc#1257254)
----------(New E)----------

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ dtc.spec ++++++
--- /var/tmp/diff_new_pack.NwUF1z/_old  2026-01-28 15:05:24.953676535 +0100
+++ /var/tmp/diff_new_pack.NwUF1z/_new  2026-01-28 15:05:24.953676535 +0100
@@ -1,7 +1,7 @@
 #
 # spec file for package dtc
 #
-# Copyright (c) 2025 SUSE LLC
+# Copyright (c) 2026 SUSE LLC and contributors
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -30,6 +30,8 @@
 Source21:       dtc.keyring
 # PATCH-FIX-UPSTREAM - https://github.com/dgibson/dtc/commit/ce1d858
 Patch1:         ce1d858.patch
+# PATCH-FIX-UPSTREAM - 
https://github.com/dgibson/dtc/commit/9a1c801a1a3c102bf95c5339c9e985b26b823a21
+Patch2:         
https://github.com/dgibson/dtc/commit/9a1c801a1a3c102bf95c5339c9e985b26b823a21.patch
 BuildRequires:  bison
 BuildRequires:  flex
 BuildRequires:  libyaml-devel

++++++ 9a1c801a1a3c102bf95c5339c9e985b26b823a21.patch ++++++
>From 9a1c801a1a3c102bf95c5339c9e985b26b823a21 Mon Sep 17 00:00:00 2001
From: Stephen Gallagher <[email protected]>
Date: Tue, 6 Jan 2026 14:19:30 -0500
Subject: [PATCH] Fix discarded const qualifiers

It's unsafe to implicitly discard the const qualifier on a pointer. In
overlay_fixup_phandle(), this was probably just an oversight, and making
the "sep" variable a const char * is sufficient to fix it.

In create_node(), however, the "p" variable is directly modifying the
buffer pointed to by "const char* node_name". To fix this, we need to
actually make a duplicate of the buffer and operate on that instead.

This introduces a malloc()/free()  and an unbounded strdup() into the
operation, but fdtput isn't a long-running service and the node_name
argument comes directly from argv, so this shouldn't introduce a
significant performance impact.

Signed-off-by: Stephen Gallagher <[email protected]>
Signed-off-by: David Gibson <[email protected]>
---
 fdtput.c             | 8 +++++---
 libfdt/fdt_overlay.c | 3 ++-
 meson.build          | 1 +
 3 files changed, 8 insertions(+), 4 deletions(-)

diff --git a/fdtput.c b/fdtput.c
index 05f2b933..fdb581a2 100644
--- a/fdtput.c
+++ b/fdtput.c
@@ -254,19 +254,21 @@ static int create_paths(char **blob, const char *in_path)
 static int create_node(char **blob, const char *node_name)
 {
        int node = 0;
-       char *p;
+       const char *p;
+       char *path = NULL;
 
        p = strrchr(node_name, '/');
        if (!p) {
                report_error(node_name, -1, -FDT_ERR_BADPATH);
                return -1;
        }
-       *p = '\0';
 
        *blob = realloc_node(*blob, p + 1);
 
        if (p > node_name) {
-               node = fdt_path_offset(*blob, node_name);
+               path = xstrndup(node_name, (size_t)(p - node_name));
+               node = fdt_path_offset(*blob, path);
+               free(path);
                if (node < 0) {
                        report_error(node_name, -1, node);
                        return -1;
diff --git a/libfdt/fdt_overlay.c b/libfdt/fdt_overlay.c
index e6b9eb64..51a38596 100644
--- a/libfdt/fdt_overlay.c
+++ b/libfdt/fdt_overlay.c
@@ -407,7 +407,8 @@ static int overlay_fixup_phandle(void *fdt, void *fdto, int 
symbols_off,
                const char *fixup_str = value;
                uint32_t path_len, name_len;
                uint32_t fixup_len;
-               char *sep, *endptr;
+               const char *sep;
+               char *endptr;
                int poffset, ret;
 
                fixup_end = memchr(value, '\0', len);
diff --git a/meson.build b/meson.build
index 66b44e87..501b706c 100644
--- a/meson.build
+++ b/meson.build
@@ -18,6 +18,7 @@ add_project_arguments(
     '-Wshadow',
     '-Wsuggest-attribute=format',
     '-Wwrite-strings',
+    '-Wdiscarded-qualifiers',
   ]),
   language: 'c'
 )

Reply via email to