lavf/rtpdec: fix RTCP SR packet length check
The minimum valid packet length is 28, given that the length includes the packet header. This didn't cause any issues so far as the code did not care about the last two fields in the SR section, but will be relevant in a future commit.
This commit is contained in:
parent
019ca5f013
commit
e0abe0a02a
1 changed files with 1 additions and 1 deletions
|
|
@ -187,7 +187,7 @@ static int rtcp_parse_packet(RTPDemuxContext *s, const unsigned char *buf,
|
|||
|
||||
switch (buf[1]) {
|
||||
case RTCP_SR:
|
||||
if (payload_len < 20) {
|
||||
if (payload_len < 28) {
|
||||
av_log(s->ic, AV_LOG_ERROR, "Invalid RTCP SR packet length\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue