You've already forked FFmpeg
mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2025-08-15 14:13:16 +02:00
avcodec/j2kenc: Only allocate cblk.data once
Fixes: memleak Found-by: <jamrial> Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
@@ -938,6 +938,7 @@ static int encode_tile(Jpeg2000EncoderContext *s, Jpeg2000Tile *tile, int tileno
|
||||
}
|
||||
}
|
||||
}
|
||||
if (!prec->cblk[cblkno].data)
|
||||
prec->cblk[cblkno].data = av_malloc(1 + 8192);
|
||||
if (!prec->cblk[cblkno].data)
|
||||
return AVERROR(ENOMEM);
|
||||
|
Reference in New Issue
Block a user