summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastian Dröge <sebastian@centricular.com>2023-07-07 10:00:19 +0300
committerGStreamer Marge Bot <gitlab-merge-bot@gstreamer-foundation.org>2023-07-19 13:13:45 +0000
commit743381cba7e26c2660e7379a53106adbaf125de0 (patch)
tree1d0c759acd30a410481e5b4eb017c624bc7cffdf
parent4266ba0fd2be7702044a5d90a8215abe41709874 (diff)
rmdemux: Check that enough SIPR audio data is available when copying
Part-of: <https://gitlab.freedesktop.org/gstreamer/gstreamer/-/merge_requests/5073>
-rw-r--r--subprojects/gst-plugins-ugly/gst/realmedia/rmdemux.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/subprojects/gst-plugins-ugly/gst/realmedia/rmdemux.c b/subprojects/gst-plugins-ugly/gst/realmedia/rmdemux.c
index eaee9acdd1..902092b24b 100644
--- a/subprojects/gst-plugins-ugly/gst/realmedia/rmdemux.c
+++ b/subprojects/gst-plugins-ugly/gst/realmedia/rmdemux.c
@@ -2168,7 +2168,13 @@ gst_rmdemux_descramble_sipr_audio (GstRMDemux * rmdemux,
GST_BUFFER_PTS (outbuf) = GST_BUFFER_PTS (b);
}
- gst_buffer_extract (b, 0, outmap.data + packet_size * p, packet_size);
+ if (gst_buffer_extract (b, 0, outmap.data + packet_size * p,
+ packet_size) != packet_size) {
+ GST_ERROR_OBJECT (rmdemux, "not enough SIPR audio data available");
+ gst_buffer_unmap (outbuf, &outmap);
+ gst_buffer_unref (outbuf);
+ return GST_FLOW_ERROR;
+ }
}
gst_buffer_unmap (outbuf, &outmap);