summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTim Blechmann <tim@klingt.org>2024-02-19 21:49:21 +0800
committerBackport Bot <gitlab-backport-bot@gstreamer-foundation.org>2024-04-29 15:35:34 +0100
commitd829ff510c5d8425314b8f2d4b281e2bc3e928cc (patch)
treefa77e063c34b228d3b2683516abf675cceaa6782
parent4a7f3d0b75c6f8b7b64d054349c7eb06fd513ca4 (diff)
v4l2: silence valgrind warning
Valgrind complains about uninitialized memory used in an ioctl Syscall param ioctl(VKI_V4L2_G_TUNER).reserved points to uninitialised byte(s) at 0x719294F: ioctl (ioctl.c:36) by 0x3126A817: gst_v4l2_fill_lists (v4l2_calls.c:185) by 0x3126A817: gst_v4l2_open (v4l2_calls.c:589) by 0x3123F1C2: gst_v4l2_device_provider_probe_device (gstv4l2deviceprovider.c:122) by 0x3123F648: gst_v4l2_device_provider_device_from_udev (gstv4l2deviceprovider.c:301) by 0x3123F998: provider_thread (gstv4l2deviceprovider.c:395) by 0x796FA50: ??? (in /usr/lib/x86_64-linux-gnu/libglib-2.0.so.0.7200.4) by 0x710CAC2: start_thread (pthread_create.c:442) by 0x719DA03: clone (clone.S:100) Address 0x44008a34 is on thread 11's stack in frame #1, created by gst_v4l2_open (v4l2_calls.c:524) Uninitialised value was created by a stack allocation at 0x3126A024: gst_v4l2_open (v4l2_calls.c:524) Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/6761>
-rw-r--r--subprojects/gst-plugins-good/sys/v4l2/v4l2_calls.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/subprojects/gst-plugins-good/sys/v4l2/v4l2_calls.c b/subprojects/gst-plugins-good/sys/v4l2/v4l2_calls.c
index e207c51a3c..b2165bc13b 100644
--- a/subprojects/gst-plugins-good/sys/v4l2/v4l2_calls.c
+++ b/subprojects/gst-plugins-good/sys/v4l2/v4l2_calls.c
@@ -177,6 +177,7 @@ gst_v4l2_fill_lists (GstV4l2Object * v4l2object)
if (input.type == V4L2_INPUT_TYPE_TUNER) {
struct v4l2_tuner vtun;
+ memset (&vtun, 0, sizeof (vtun));
v4l2channel->tuner = input.tuner;
channel->flags |= GST_TUNER_CHANNEL_FREQUENCY;