summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Koleszar <jkoleszar@google.com>2010-11-23 13:40:31 -0500
committerJohn Koleszar <jkoleszar@google.com>2010-11-23 13:49:40 -0500
commit19255b8fe0cbc4d3b7d98650e9cdcadd95c762b9 (patch)
tree96a9c1016077b0f18db97b72d2c3105bceafe5e5
parentad6150f7697ce486630c75cb53fa607928ced4c7 (diff)
downloadlibvpx-19255b8fe0cbc4d3b7d98650e9cdcadd95c762b9.tar
libvpx-19255b8fe0cbc4d3b7d98650e9cdcadd95c762b9.tar.gz
libvpx-19255b8fe0cbc4d3b7d98650e9cdcadd95c762b9.tar.bz2
libvpx-19255b8fe0cbc4d3b7d98650e9cdcadd95c762b9.zip
vpxdec: fix use of uninitialized memory for raw files
The sz member of the vpx_codec_stream_info_t structure must be initialized when passed to vpx_codec_peek_stream_info(). Change-Id: I2d13d287d9639262b932cf44671a595fdf3c38ef
-rw-r--r--vpxdec.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/vpxdec.c b/vpxdec.c
index 5eb0bebde..dd1796380 100644
--- a/vpxdec.c
+++ b/vpxdec.c
@@ -442,6 +442,8 @@ unsigned int file_is_raw(FILE *infile,
int is_raw = 0;
vpx_codec_stream_info_t si;
+ si.sz = sizeof(si);
+
if (fread(buf, 1, 32, infile) == 32)
{
int i;