Skip to content

Commit 6a02de2

Browse files
committed
avformat/aiffdec: avoid integer overflow in get_meta()
Fixes: signed integer overflow: 2147483647 + 1 cannot be represented in type 'int' Fixes: 45891/clusterfuzz-testcase-minimized-ffmpeg_dem_AIFF_fuzzer-6159183893889024 Found-by: continuous fuzzing process https://github.com/google/oss-fuzz/tree/master/projects/ffmpeg Signed-off-by: Michael Niedermayer <[email protected]>
1 parent c16a0ed commit 6a02de2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

libavformat/aiffdec.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ static int get_tag(AVIOContext *pb, uint32_t * tag)
7373
/* Metadata string read */
7474
static void get_meta(AVFormatContext *s, const char *key, int size)
7575
{
76-
uint8_t *str = av_malloc(size+1);
76+
uint8_t *str = av_malloc(size+1U);
7777

7878
if (str) {
7979
int res = avio_read(s->pb, str, size);

0 commit comments

Comments
 (0)