mirror of
https://gitlab.freedesktop.org/gstreamer/gstreamer.git
synced 2024-12-24 17:20:36 +00:00
rtmp2: Reject oversized messages
We only have 24 bits for the size, so reject anything larger.
This commit is contained in:
parent
0044e7a1ba
commit
6583e00d50
2 changed files with 4 additions and 0 deletions
|
@ -188,6 +188,8 @@ select_chunk_type (GstRtmpChunkStream * cstream, GstBuffer * buffer)
|
|||
meta->size = gst_buffer_get_size (buffer);
|
||||
meta->cstream = cstream->id;
|
||||
|
||||
g_return_val_if_fail (meta->size <= GST_RTMP_MAXIMUM_MESSAGE_SIZE, -1);
|
||||
|
||||
if (!old_buffer) {
|
||||
GST_TRACE ("Picking header 0: no previous header");
|
||||
meta->ts_delta = dts_to_abs_ts (buffer);
|
||||
|
|
|
@ -25,6 +25,8 @@
|
|||
|
||||
G_BEGIN_DECLS
|
||||
|
||||
#define GST_RTMP_MAXIMUM_MESSAGE_SIZE 0xFFFFFF
|
||||
|
||||
typedef enum {
|
||||
GST_RTMP_MESSAGE_TYPE_INVALID = 0,
|
||||
GST_RTMP_MESSAGE_TYPE_SET_CHUNK_SIZE = 1,
|
||||
|
|
Loading…
Reference in a new issue