@@ -328,7 +328,7 @@ static int fourxm_read_packet(AVFormatContext *s,
case cfr2_TAG:
/* allocate 8 more bytes than 'size' to account for fourcc
* and size */
- if (size > INT_MAX - AV_INPUT_BUFFER_PADDING_SIZE - 8)
+ if (size > AV_PKT_MAX_PAYLOAD_SIZE - 8)
return AVERROR_INVALIDDATA;
if (fourxm->video_stream_index < 0)
return AVERROR_INVALIDDATA;
@@ -120,7 +120,7 @@ int ff_flac_parse_picture(AVFormatContext *s, uint8_t **bufp, int buf_size,
left = bytestream2_get_bytes_left(&g);
if (len <= 0 || len > left) {
- if (len > MAX_TRUNC_PICTURE_SIZE || len >= INT_MAX - AV_INPUT_BUFFER_PADDING_SIZE) {
+ if (len > MAX_TRUNC_PICTURE_SIZE || len >= AV_PKT_MAX_PAYLOAD_SIZE) {
av_log(s, AV_LOG_ERROR, "Attached picture metadata block too big %u\n", len);
if (s->error_recognition & AV_EF_EXPLODE)
return AVERROR_INVALIDDATA;
Signed-off-by: James Almer <jamrial@gmail.com> --- libavformat/4xm.c | 2 +- libavformat/flac_picture.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)