vpxdec: fix use of uninitialized memory for raw files
authorJohn Koleszar <jkoleszar@google.com>
Tue, 23 Nov 2010 18:40:31 +0000 (13:40 -0500)
committerJohn Koleszar <jkoleszar@google.com>
Tue, 23 Nov 2010 18:49:40 +0000 (13:49 -0500)
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

vpxdec.c

index 5eb0beb..dd17963 100644 (file)
--- 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;