patch 'examples/vm_power: fix format-truncation warning' has been queued to stable release 25.11.1

Kevin Traynor ktraynor at redhat.com
Thu Feb 26 14:10:35 CET 2026


Hi,

FYI, your patch has been queued to stable release 25.11.1

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 03/02/26. So please
shout if anyone has objections.

Also note that after the patch there's a diff of the upstream commit vs the
patch applied to the branch. This will indicate if there was any rebasing
needed to apply to the stable branch. If there were code changes for rebasing
(ie: not only metadata diffs), please double check that the rebase was
correctly done.

Queued patches are on a temporary branch at:
https://github.com/kevintraynor/dpdk-stable

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable/commit/22c3755b568ea3f9e5d24c31fb76efb70e38daa0

Thanks.

Kevin

---
>From 22c3755b568ea3f9e5d24c31fb76efb70e38daa0 Mon Sep 17 00:00:00 2001
From: Kevin Traynor <ktraynor at redhat.com>
Date: Wed, 25 Feb 2026 15:34:24 +0000
Subject: [PATCH] examples/vm_power: fix format-truncation warning
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

In function ‘rte_strlcpy’,
    inlined from ‘add_host_channels’ at
../examples/vm_power_manager/channel_manager.c:600:3:
../lib/eal/include/rte_string_fns.h:63:24:
warning: ‘%s’ directive output may be truncated writing up to
4095 bytes into a region of size 108 [-Wformat-truncation=]
63 |         return (size_t)snprintf(dst, size, "%s", src);
   |                        ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Check for truncation of socket_path[4096] into channel_path[108] to
remove warning.

Cc: stable at dpdk.org

Signed-off-by: Kevin Traynor <ktraynor at redhat.com>
---
 examples/vm_power_manager/channel_manager.c | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/examples/vm_power_manager/channel_manager.c b/examples/vm_power_manager/channel_manager.c
index 7d7efdd05a..b69449c61d 100644
--- a/examples/vm_power_manager/channel_manager.c
+++ b/examples/vm_power_manager/channel_manager.c
@@ -561,4 +561,5 @@ add_host_channels(void)
 	struct core_info *ci;
 	struct channel_info *chan_infos[RTE_MAX_LCORE];
+	size_t channel_path_size;
 	int i;
 
@@ -598,6 +599,13 @@ add_host_channels(void)
 		}
 		chan_infos[i] = chan_info;
-		strlcpy(chan_info->channel_path, socket_path,
-				sizeof(chan_info->channel_path));
+		channel_path_size = sizeof(chan_info->channel_path);
+		if (strlcpy(chan_info->channel_path, socket_path,
+			      channel_path_size) >= channel_path_size) {
+			RTE_LOG(ERR, CHANNEL_MANAGER, "Socket path is too long "
+				"'%s' >= %zu\n", socket_path, channel_path_size);
+			rte_free(chan_info);
+			chan_infos[i] = NULL;
+			goto error;
+		}
 
 		if (setup_host_channel_info(&chan_info, i) < 0) {
-- 
2.53.0



More information about the stable mailing list