Mercurial > libavformat.hg
changeset 2897:6d6dfee21471 libavformat
validate streamid before use
author | ivo |
---|---|
date | Sat, 05 Jan 2008 22:18:44 +0000 |
parents | b6d3640bedeb |
children | 32895d361262 |
files | pva.c |
diffstat | 1 files changed, 4 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/pva.c Sat Jan 05 22:15:19 2008 +0000 +++ b/pva.c Sat Jan 05 22:18:44 2008 +0000 @@ -79,6 +79,10 @@ 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"); }