diff options
Diffstat (limited to 'libavformat/rtpdec.c')
-rw-r--r-- | libavformat/rtpdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/libavformat/rtpdec.c b/libavformat/rtpdec.c index f95b364287..b0f0aaa4b0 100644 --- a/libavformat/rtpdec.c +++ b/libavformat/rtpdec.c @@ -531,7 +531,7 @@ static int rtp_parse_packet_internal(RTPDemuxContext *s, AVPacket *pkt, if (ret < 0) return AVERROR(EAGAIN); if (ret < len) { - s->read_buf_size = len - ret; + s->read_buf_size = FFMIN(len - ret, sizeof(s->buf)); memcpy(s->buf, buf + ret, s->read_buf_size); s->read_buf_index = 0; return 1; |