oggdec: check stream index before using it in ogg_get_length()
authorMichael Niedermayer <michaelni@gmx.at>
Sun, 5 Aug 2012 02:41:34 +0000 (04:41 +0200)
committerMichael Niedermayer <michaelni@gmx.at>
Mon, 6 Aug 2012 14:51:59 +0000 (16:51 +0200)
commit606538df6c05df51aa811cef0c0bccb7499cc4a1
tree025bb06073fe055397727a5ca4701c47abb96e16
parenta19010f7a6bc9e37b22e5b19d5eaba84d404b2f4
oggdec: check stream index before using it in ogg_get_length()

Fixes crash based on a uninitialized array index read.
If the read does not crash then out of array writes based
on the same index might have been triggered afterwards.

Found-by: inferno@chromium.org
Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
(cherry picked from commit 9e1c55cfdec1e1e46fa39b92ea5c425ba9499c68)

Signed-off-by: Michael Niedermayer <michaelni@gmx.at>
libavformat/oggdec.c