mirror of
https://github.com/FFmpeg/FFmpeg.git
synced 2024-12-23 12:43:46 +02:00
avcodec/pnmdec: Use 64bit for input size check
Fixes: out of array read
Fixes: poc3
Reported-by: VulDB CNA Team
Found-by: CookedMelon
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
(cherry picked from commit 3faadbe2a2
)
Signed-off-by: Michael Niedermayer <michael@niedermayer.cc>
This commit is contained in:
parent
6913ebd5b4
commit
ceeb1928da
@ -256,7 +256,7 @@ static int pnm_decode_frame(AVCodecContext *avctx, void *data,
|
||||
}
|
||||
break;
|
||||
case AV_PIX_FMT_GBRPF32:
|
||||
if (avctx->width * avctx->height * 12 > s->bytestream_end - s->bytestream)
|
||||
if (avctx->width * avctx->height * 12LL > s->bytestream_end - s->bytestream)
|
||||
return AVERROR_INVALIDDATA;
|
||||
scale = 1.f / s->scale;
|
||||
if (s->endian) {
|
||||
|
Loading…
Reference in New Issue
Block a user