History

avcodec/pnmdec: Use 64bit for input size check

Fixes: out of array read Fixes: poc3

Michael Niedermayer committed 2 years ago

Commit 3faadbe1 parent 167bf8f1 file · +1 −1Browse files

Unified · Split

libavcodec/pnmdec.c+1−1
@@ -262,7 +262,7 @@ static int pnm_decode_frame(AVCodecContext *avctx, AVFrame *p, · 261 unmodified lines
262262 break;
263263 case AV_PIX_FMT_GBRPF32:
264264 if (!s->half) {
265− if (avctx->width * avctx->height * 12 > s->bytestream_end - s->bytestream)
265+ if (avctx->width * avctx->height * 12LL > s->bytestream_end - s->bytestream)
266266 return AVERROR_INVALIDDATA;
267267 scale = 1.f / s->scale;
268268 if (s->endian) {

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t