avcodec/jpeg2000: Check sum of sizes of band->prec before allocating