2022-07-06 05:59:22 +08:00
|
|
|
diff --git a/src/read.c b/src/read.c
|
2023-02-24 03:21:03 +08:00
|
|
|
index e45db4e..0ddb05a 100644
|
2022-07-06 05:59:22 +08:00
|
|
|
--- a/src/read.c
|
|
|
|
+++ b/src/read.c
|
2023-02-24 03:21:03 +08:00
|
|
|
@@ -945,7 +945,7 @@ static avifResult avifDecoderItemMaxExtent(const avifDecoderItem * item, const a
|
2022-07-06 05:59:22 +08:00
|
|
|
return AVIF_RESULT_BMFF_PARSE_FAILED;
|
|
|
|
}
|
|
|
|
startOffset += remainingOffset;
|
|
|
|
- extentSize -= remainingOffset;
|
|
|
|
+ extentSize -= (size_t)remainingOffset;
|
|
|
|
remainingOffset = 0;
|
|
|
|
}
|
|
|
|
}
|
2023-02-24 03:21:03 +08:00
|
|
|
@@ -3147,7 +3147,7 @@ static avifResult avifDecoderPrepareSample(avifDecoder * decoder, avifDecodeSamp
|
|
|
|
if ((decoder->io->sizeHint > 0) && (sample->offset > decoder->io->sizeHint)) {
|
|
|
|
return AVIF_RESULT_BMFF_PARSE_FAILED;
|
|
|
|
}
|
|
|
|
- avifResult readResult = decoder->io->read(decoder->io, 0, sample->offset, bytesToRead, &sampleContents);
|
|
|
|
+ avifResult readResult = decoder->io->read(decoder->io, 0, (size_t)sample->offset, bytesToRead, &sampleContents);
|
2022-07-06 05:59:22 +08:00
|
|
|
if (readResult != AVIF_RESULT_OK) {
|
|
|
|
return readResult;
|
|
|
|
}
|