|
|
@ -137,11 +137,11 @@ static void add_entry(TiffEncoderContext * s, |
|
|
|
bytestream_put_le16(&entries_ptr, type); |
|
|
|
bytestream_put_le16(&entries_ptr, type); |
|
|
|
bytestream_put_le32(&entries_ptr, count); |
|
|
|
bytestream_put_le32(&entries_ptr, count); |
|
|
|
|
|
|
|
|
|
|
|
if (type_sizes[type] * count <= 4) { |
|
|
|
if (type_sizes[type] * (int64_t)count <= 4) { |
|
|
|
tnput(&entries_ptr, count, ptr_val, type, 0); |
|
|
|
tnput(&entries_ptr, count, ptr_val, type, 0); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
bytestream_put_le32(&entries_ptr, *s->buf - s->buf_start); |
|
|
|
bytestream_put_le32(&entries_ptr, *s->buf - s->buf_start); |
|
|
|
check_size(s, count * type_sizes2[type]); |
|
|
|
check_size(s, count * (int64_t)type_sizes2[type]); |
|
|
|
tnput(s->buf, count, ptr_val, type, 0); |
|
|
|
tnput(s->buf, count, ptr_val, type, 0); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|