You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-11-23 21:54:53 +02:00
avformat/sctp: Check size in sctp_write()
Fixes: out of array access No testcase Found-by: Joshua Rogers <joshua@joshua.hu> with ZeroPath Reviewed-by: Joshua Rogers <joshua@joshua.hu> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@@ -332,6 +332,9 @@ static int sctp_write(URLContext *h, const uint8_t *buf, int size)
|
||||
}
|
||||
|
||||
if (s->max_streams) {
|
||||
if (size < 2)
|
||||
return AVERROR(EINVAL);
|
||||
|
||||
/*StreamId is introduced as a 2byte code into the stream*/
|
||||
struct sctp_sndrcvinfo info = { 0 };
|
||||
info.sinfo_stream = AV_RB16(buf);
|
||||
|
||||
Reference in New Issue
Block a user