diff options
author | Ivo van Poorten <ivop@euronet.nl> | 2008-01-05 22:18:44 +0000 |
---|---|---|
committer | Ivo van Poorten <ivop@euronet.nl> | 2008-01-05 22:18:44 +0000 |
commit | 7705cf7e1515d56e811a8d92eee65f7969e5fba8 (patch) | |
tree | 9db6043285d50c063d1ebb5d8050ee69f11bf3bd | |
parent | fe332ad66e663b7b8a72e96efccee08d27261f6e (diff) | |
download | ffmpeg-7705cf7e1515d56e811a8d92eee65f7969e5fba8.tar.gz |
validate streamid before use
Originally committed as revision 11427 to svn://svn.ffmpeg.org/ffmpeg/trunk
-rw-r--r-- | libavformat/pva.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libavformat/pva.c b/libavformat/pva.c index f819b832d1..760f7fc90e 100644 --- a/libavformat/pva.c +++ b/libavformat/pva.c @@ -79,6 +79,10 @@ static int pva_read_packet(AVFormatContext *s, AVPacket *pkt) { av_log(s, AV_LOG_ERROR, "invalid syncword\n"); return AVERROR(EIO); } + if (streamid != PVA_VIDEO_PAYLOAD && streamid != PVA_AUDIO_PAYLOAD) { + av_log(s, AV_LOG_ERROR, "invalid streamid\n"); + return AVERROR(EIO); + } if (reserved != 0x55) { av_log(s, AV_LOG_WARNING, "expected reserved byte to be 0x55\n"); } |