From: John Koleszar Date: Fri, 7 Jun 2013 15:49:38 +0000 (-0700) Subject: Fix a crash in vpxdec X-Git-Tag: v1.3.0~1104^2~13 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=c0e561d15e5b08fae575c539da275d31d3eb519b;p=libvpx 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 --- diff --git a/vpxdec.c b/vpxdec.c index 811d41ba3..9ae868f29 100644 --- a/vpxdec.c +++ b/vpxdec.c @@ -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" :