]> git.sesse.net Git - ffmpeg/blobdiff - libavcodec/truemotion2.c
build: Try to find fate_config.sh.template in source path
[ffmpeg] / libavcodec / truemotion2.c
index 1054a7e06b0195034f05cc7908a0265b7945f1ae..95487d94361688547f5f769010eb5179051996f2 100644 (file)
@@ -286,6 +286,8 @@ static int tm2_read_stream(TM2Context *ctx, const uint8_t *buf, int stream_id, i
     buf += 4; cur += 4;
     buf += 4; cur += 4; /* unused by decoder */
 
+    if(skip < cur)
+        return -1;
     init_get_bits(&ctx->gb, buf, (skip - cur) * 8);
     if(tm2_build_huff_table(ctx, &codes) == -1)
         return -1;