gst-shark: Upgrade to 0.7.3.1

Fix buffer overflow found with clang

Signed-off-by: Khem Raj <raj.khem@gmail.com>
This commit is contained in:
Khem Raj
2022-02-04 09:25:54 -08:00
parent a29f3b1003
commit 9eb9b02dc5
2 changed files with 37 additions and 3 deletions
@@ -0,0 +1,33 @@
From d84807ec6d6f8511e4ec939a745d4d7bb35c3cfb Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Fri, 4 Feb 2022 09:22:48 -0800
Subject: [PATCH] tracers: Fix buffer overflow
Fixes
| ../../../git/plugins/tracers/gstcpuusagecompute.c:106:9: error: 'fscanf' may overflow; destination buffer in argument 3 has size 8, but the corresponding specifier may require size 9 [-Werror,-Wfortify-sour
ce]
| cpu_name, &user[0], &nice[0], &system[0], &idle[0], &iowait, &irq,
| ^
Upstream-Status: Pending
Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
plugins/tracers/gstcpuusagecompute.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/plugins/tracers/gstcpuusagecompute.c b/plugins/tracers/gstcpuusagecompute.c
index 39255fb..00bae66 100644
--- a/plugins/tracers/gstcpuusagecompute.c
+++ b/plugins/tracers/gstcpuusagecompute.c
@@ -69,7 +69,7 @@ gst_cpu_usage_compute (GstCPUUsage * cpu_usage)
gint *idle;
gint *idle_aux;
- gchar cpu_name[CPU_NAME_MAX_SIZE];
+ gchar cpu_name[CPU_NAME_MAX_SIZE+1];
gint iowait; /* Time waiting for I/O to complete */
gint irq; /* Time servicing interrupts */
gint softirq; /* Time servicing softirqs */
--
2.35.1
@@ -10,14 +10,15 @@ DEPENDS = "gstreamer1.0 gstreamer1.0-plugins-base gstreamer1.0-plugins-bad "
SRCBRANCH ?= "master"
PV = "0.7.2"
PV = "0.7.3.1"
SRCREV_base = "50e3dbd3b131de2a39d3917576e8f834631ec46b"
SRCREV_common = "88e512ca7197a45c4114f7fa993108f23245bf50"
SRCREV_base = "5413ef5475e5b70476c2480a75ca3746d91d4caf"
SRCREV_common = "b64f03f6090245624608beb5d2fff335e23a01c0"
SRCREV_FORMAT = "base_common"
SRC_URI = " \
git://github.com/RidgeRun/gst-shark.git;protocol=https;branch=${SRCBRANCH};name=base \
git://gitlab.freedesktop.org/gstreamer/common.git;protocol=https;destsuffix=git/common;name=common;;branch=master \
file://0001-tracers-Fix-buffer-overflow.patch \
"
S = "${WORKDIR}/git"