avcodec/iff: Check for overlap in cmap_read_palette()