Fixes: signed integer overflow: 65535 * 55335 cannot be represented in type 'int' Fixes: 21955/clusterfuzz-testcase-minimized-ffmpeg_AV_CODEC_ID_PGMYUV_fuzzer-5669206981083136
Showing the changes to libavcodec (1 of 1 file). Show all
Unified · Split
| @@ -132,7 +132,7 @@ static int pnm_decode_frame(AVCodecContext *avctx, void *data, · 131 unmodified lines | ||
| 132 | 132 | init_put_bits(&pb, ptr, linesize); |
| 133 | 133 | for(j=0; j<avctx->width * components; j++){ |
| 134 | 134 | unsigned int c=0; |
| 135 | − int v=0; | |
| 135 | + unsigned v=0; | |
| 136 | 136 | if(s->type < 4) |
| 137 | 137 | while(s->bytestream < s->bytestream_end && (*s->bytestream < '0' || *s->bytestream > '9' )) |
| 138 | 138 | s->bytestream++; |