mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-12-11 17:30:00 +01:00
Merge remote-tracking branch 'qatar/release/9' into release/1.1
* qatar/release/9: tiff: do not overread the source buffer apetag: use int64_t for filesize Conflicts: libavcodec/tiff.c Merged-by: Michael Niedermayer <michaelni@gmx.at>
This commit is contained in:
@@ -548,15 +548,12 @@ static int tiff_unpack_strip(TiffContext *s, uint8_t *dst, int stride,
|
||||
code = (int8_t) * src++;
|
||||
if (code >= 0) {
|
||||
code++;
|
||||
if (pixels + code > width) {
|
||||
if (pixels + code > width ||
|
||||
ssrc + size - src < code) {
|
||||
av_log(s->avctx, AV_LOG_ERROR,
|
||||
"Copy went out of bounds\n");
|
||||
return -1;
|
||||
}
|
||||
if (ssrc + size - src < code) {
|
||||
av_log(s->avctx, AV_LOG_ERROR, "Read went out of bounds\n");
|
||||
return AVERROR_INVALIDDATA;
|
||||
}
|
||||
horizontal_fill(s->bpp * (s->avctx->pix_fmt == AV_PIX_FMT_PAL8),
|
||||
dst, 1, src, 0, code, pixels);
|
||||
src += code;
|
||||
|
||||
@@ -114,7 +114,7 @@ static int ape_tag_read_field(AVFormatContext *s)
|
||||
int64_t ff_ape_parse_tag(AVFormatContext *s)
|
||||
{
|
||||
AVIOContext *pb = s->pb;
|
||||
int file_size = avio_size(pb);
|
||||
int64_t file_size = avio_size(pb);
|
||||
uint32_t val, fields, tag_bytes;
|
||||
uint8_t buf[8];
|
||||
int64_t tag_start;
|
||||
|
||||
Reference in New Issue
Block a user