shithub: libvpx

Download patch

ref: ef15d38df07e518d1ae3ed7feca3da0946ba75e6
parent: 43e0e082d15b1066a1641501362de25ade00a62b
parent: 0be513e8e881d263a9eec27c6cf3add3bc2d2316
author: James Zern <jzern@google.com>
date: Thu Apr 27 17:47:09 EDT 2017

Merge "webm_read_frame: avoid NULL dereference"

--- a/webmdec.cc
+++ b/webmdec.cc
@@ -165,10 +165,11 @@
     }
     if (get_new_block) {
       block = block_entry->GetBlock();
+      if (block == NULL) return -1;
       webm_ctx->block_frame_index = 0;
     }
-  } while (block->GetTrackNumber() != webm_ctx->video_track_index ||
-           block_entry_eos);
+  } while (block_entry_eos ||
+           block->GetTrackNumber() != webm_ctx->video_track_index);
 
   webm_ctx->cluster = cluster;
   webm_ctx->block_entry = block_entry;