From 9bb508c742ba3138d4230ec6ed94272dc9846c93 Mon Sep 17 00:00:00 2001 From: Andrey Sazonov Date: Thu, 21 May 2020 14:28:38 +0000 Subject: [PATCH] planaraudioadapter: fix possible NULL ptr dereference Part-of: --- gst-libs/gst/audio/gstplanaraudioadapter.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/gst-libs/gst/audio/gstplanaraudioadapter.c b/gst-libs/gst/audio/gstplanaraudioadapter.c index 758c1c925a..1a843da3a1 100644 --- a/gst-libs/gst/audio/gstplanaraudioadapter.c +++ b/gst-libs/gst/audio/gstplanaraudioadapter.c @@ -404,8 +404,7 @@ gst_planar_audio_adapter_get_buffer (GstPlanarAudioAdapter * adapter, gsize cur_skip = skip; gsize take_from_cur; GSList *cur_node = adapter->buflist; - - while (need > 0) { + while (cur_node && need > 0) { cur = cur_node->data; meta = gst_buffer_get_audio_meta (cur); take_from_cur = need > (meta->samples - cur_skip) ?