GetByteContext stripdata;
int retry_for_subifd, retry_for_page;
int is_dng;
+ int has_tile_bits, has_strip_bits;
bytestream2_init(&s->gb, avpkt->data, avpkt->size);
return AVERROR_INVALIDDATA;
}
+ has_tile_bits = s->is_tiled || s->tile_byte_counts_offset || s->tile_offsets_offset || s->tile_width || s->tile_length || s->tile_count;
+ has_strip_bits = s->strippos || s->strips || s->stripoff || s->rps || s->sot || s->sstype || s->stripsize || s->stripsizesoff;
+
+ if (has_tile_bits && has_strip_bits) {
+ av_log(avctx, AV_LOG_ERROR, "Tiled TIFF is not allowed to strip\n");
+ return AVERROR_INVALIDDATA;
+ }
+
/* now we have the data and may start decoding */
if ((ret = init_image(s, &frame)) < 0)
return ret;