# HG changeset patch # User michael # Date 1195503286 0 # Node ID de81a7e065fc55fed974a20e4136b2957a678684 # Parent 2fa5d656af8eb6f6ae0bf11a1ae5ef54a2449118 check region depth for validity (32/64/128 would crash at least due to 1<depth = 1 << (((*buf++) >> 2) & 7); + if(region->depth<2 || region->depth>8){ + av_log(avctx, AV_LOG_ERROR, "region depth %d is invalid\n", region->depth); + region->depth= 4; + } region->clut = *buf++; if (region->depth == 8)