rtpjitterbuffer: Fix invalid memory access in rtp_jitter_buffer_pop()
authorSangchul Lee <sc11.lee@samsung.com>
Tue, 15 Mar 2022 06:44:17 +0000 (15:44 +0900)
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>
Thu, 17 Mar 2022 12:46:14 +0000 (12:46 +0000)
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/1973>

subprojects/gst-plugins-good/gst/rtpmanager/rtpjitterbuffer.c

index af8cf63..32b1661 100644 (file)
@@ -1309,7 +1309,8 @@ rtp_jitter_buffer_pop (RTPJitterBuffer * jbuf, gint * percent)
 
   /* let's clear the pointers so we can ensure we don't free items that are
    * still in the jitterbuffer */
-  item->next = item->prev = NULL;
+  if (item)
+    item->next = item->prev = NULL;
 
   return (RTPJitterBufferItem *) item;
 }