[dpdk-stable] patch 'examples/power: fix string null termination' has been queued to LTS release 18.11.2

Kevin Traynor ktraynor at redhat.com
Wed May 8 12:15:13 CEST 2019


Hi,

FYI, your patch has been queued to LTS release 18.11.2

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 05/13/19. 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-queue

This queued commit can be viewed at:
https://github.com/kevintraynor/dpdk-stable-queue/commit/72be583f5a51630f79572dc6066b0cd89ee3868c

Thanks.

Kevin Traynor

---
>From 72be583f5a51630f79572dc6066b0cd89ee3868c Mon Sep 17 00:00:00 2001
From: Reshma Pattan <reshma.pattan at intel.com>
Date: Tue, 9 Apr 2019 17:00:24 +0100
Subject: [PATCH] examples/power: fix string null termination

[ upstream commit 4c2caea070fb1ceb16688870d44bd4016ce5d0e4 ]

After the read() the jason_data null termination is missing
for the case "indent < 0", for "indent > 0" and "indent == 0"
cases null termination is already handled.

So add the missing case "indent < 0" to the existing "indent == 0"
case to fix null termination.

Coverity issue: 337680
Fixes: a63504a90f ("examples/power: add JSON string handling")

Signed-off-by: Reshma Pattan <reshma.pattan at intel.com>
Acked-by: David Hunt <david.hunt at intel.com>
---
 examples/vm_power_manager/channel_monitor.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/examples/vm_power_manager/channel_monitor.c b/examples/vm_power_manager/channel_monitor.c
index 5da531542..d45d8f74b 100644
--- a/examples/vm_power_manager/channel_monitor.c
+++ b/examples/vm_power_manager/channel_monitor.c
@@ -836,5 +836,5 @@ read_json_packet(struct channel_info *chan_info)
 			if ((indent > 0) || (idx > 0))
 				idx++;
-			if (indent == 0)
+			if (indent <= 0)
 				json_data[idx] = 0;
 			if (idx >= MAX_JSON_STRING_LEN-1)
-- 
2.20.1

---
  Diff of the applied patch vs upstream commit (please double-check if non-empty:
---
--- -	2019-05-08 11:05:07.379828478 +0100
+++ 0031-examples-power-fix-string-null-termination.patch	2019-05-08 11:05:05.814933075 +0100
@@ -1 +1 @@
-From 4c2caea070fb1ceb16688870d44bd4016ce5d0e4 Mon Sep 17 00:00:00 2001
+From 72be583f5a51630f79572dc6066b0cd89ee3868c Mon Sep 17 00:00:00 2001
@@ -5,0 +6,2 @@
+[ upstream commit 4c2caea070fb1ceb16688870d44bd4016ce5d0e4 ]
+
@@ -15 +16,0 @@
-Cc: stable at dpdk.org
@@ -24 +25 @@
-index ad1ddde07..bc5679d4b 100644
+index 5da531542..d45d8f74b 100644
@@ -27 +28 @@
-@@ -816,5 +816,5 @@ read_json_packet(struct channel_info *chan_info)
+@@ -836,5 +836,5 @@ read_json_packet(struct channel_info *chan_info)


More information about the stable mailing list