Fixes: out of array read Fixes: poc3
Showing the changes to libavcodec (1 of 1 file). Show all
Unified · Split
| @@ -262,7 +262,7 @@ static int pnm_decode_frame(AVCodecContext *avctx, AVFrame *p, · 261 unmodified lines | |||
| 262 | break; | 262 | break; |
| 263 | case AV_PIX_FMT_GBRPF32: | 263 | case AV_PIX_FMT_GBRPF32: |
| 264 | if (!s->half) { | 264 | 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) |
| 266 | return AVERROR_INVALIDDATA; | 266 | return AVERROR_INVALIDDATA; |
| 267 | scale = 1.f / s->scale; | 267 | scale = 1.f / s->scale; |
| 268 | if (s->endian) { | 268 | if (s->endian) { |