mirror of https://git.ffmpeg.org/ffmpeg.git
validate streamid before use
Originally committed as revision 11427 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
fe332ad66e
commit
7705cf7e15
|
@ -79,6 +79,10 @@ static int pva_read_packet(AVFormatContext *s, AVPacket *pkt) {
|
||||||
av_log(s, AV_LOG_ERROR, "invalid syncword\n");
|
av_log(s, AV_LOG_ERROR, "invalid syncword\n");
|
||||||
return AVERROR(EIO);
|
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) {
|
if (reserved != 0x55) {
|
||||||
av_log(s, AV_LOG_WARNING, "expected reserved byte to be 0x55\n");
|
av_log(s, AV_LOG_WARNING, "expected reserved byte to be 0x55\n");
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue