avcodec/dfa: Check dimension against maximum