Browse Source

avformat/rmdec: Check codec_data_size

Fixes infinite loop
Fixes Ticket4154

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit a6f730730b)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
tags/n2.4.5
Michael Niedermayer 11 years ago
parent
commit
117dcc2097
1 changed files with 3 additions and 0 deletions
  1. +3
    -0
      libavformat/rmdec.c

+ 3
- 0
libavformat/rmdec.c View File

@@ -312,6 +312,9 @@ ff_rm_read_mdpr_codecdata (AVFormatContext *s, AVIOContext *pb,
int64_t codec_pos;
int ret;

if (codec_data_size < 0)
return AVERROR_INVALIDDATA;

avpriv_set_pts_info(st, 64, 1, 1000);
codec_pos = avio_tell(pb);
v = avio_rb32(pb);


Loading…
Cancel
Save