Commit d821bf33 authored by ivo's avatar ivo

validate streamid before use


git-svn-id: file:///var/local/repositories/ffmpeg/trunk@11427 9553f0bf-9b14-0410-a0b8-cfaf0461ba5b
parent 7d946707
......@@ -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");
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment