projects
/
platform
/
upstream
/
libav.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
fe332ad
)
validate streamid before use
author
Ivo van Poorten
<ivop@euronet.nl>
Sat, 5 Jan 2008 22:18:44 +0000
(22:18 +0000)
committer
Ivo van Poorten
<ivop@euronet.nl>
Sat, 5 Jan 2008 22:18:44 +0000
(22:18 +0000)
Originally committed as revision 11427 to svn://svn.ffmpeg.org/ffmpeg/trunk
libavformat/pva.c
patch
|
blob
|
history
diff --git
a/libavformat/pva.c
b/libavformat/pva.c
index
f819b83
..
760f7fc
100644
(file)
--- 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");
}