diff options
author | John Koleszar <jkoleszar@google.com> | 2013-06-07 08:49:38 -0700 |
---|---|---|
committer | Gerrit Code Review <gerrit@gerrit.golo.chromium.org> | 2013-06-10 12:46:14 -0700 |
commit | c0e561d15e5b08fae575c539da275d31d3eb519b (patch) | |
tree | c8ec4bfe6c21fe72ea0376299095aa5bd6fdfa61 /vpxdec.c | |
parent | 44db42c1142d9e893f0e07f3ac00d16b4c6c0532 (diff) | |
download | libvpx-c0e561d15e5b08fae575c539da275d31d3eb519b.tar libvpx-c0e561d15e5b08fae575c539da275d31d3eb519b.tar.gz libvpx-c0e561d15e5b08fae575c539da275d31d3eb519b.tar.bz2 libvpx-c0e561d15e5b08fae575c539da275d31d3eb519b.zip |
Fix a crash in vpxdec
If the codec fails to return a frame on the second frame (as in a VP8 alt-ref,
then img will be a null pointer and dereferencing it while trying to write
the color format (again) will crash.
Change-Id: Ie48710d4c5715f532d453c879c71c20ccdeb81cc
Diffstat (limited to 'vpxdec.c')
-rw-r--r-- | vpxdec.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -1025,7 +1025,7 @@ int main(int argc, const char **argv_) { show_progress(frame_in, frame_out, dx_time); if (!noblit) { - if (frame_out == 1 && use_y4m) { + if (frame_out == 1 && img && use_y4m) { /* Write out the color format to terminate the header line */ const char *color = img->fmt == VPX_IMG_FMT_444A ? "C444alpha\n" : |