diff --git a/libavcodec/pnmdec.c b/libavcodec/pnmdec.c
index d4261a4..b2f1b44 100644
|
a
|
b
|
static int pnm_decode_frame(AVCodecContext *avctx, void *data,
|
| 124 | 124 | do_read: |
| 125 | 125 | ptr = p->data[0]; |
| 126 | 126 | linesize = p->linesize[0]; |
| 127 | | if (s->bytestream + n * avctx->height > s->bytestream_end) |
| | 127 | if (0&&s->bytestream + n * avctx->height > s->bytestream_end) |
| 128 | 128 | return AVERROR_INVALIDDATA; |
| 129 | 129 | if(s->type < 4 || (is_mono && s->type==7)){ |
| 130 | 130 | for (i=0; i<avctx->height; i++) { |
| … |
… |
static int pnm_decode_frame(AVCodecContext *avctx, void *data,
|
| 160 | 160 | }else{ |
| 161 | 161 | for (i = 0; i < avctx->height; i++) { |
| 162 | 162 | if (!upgrade) |
| | 163 | if (s->bytestream + n <= s->bytestream_end) |
| 163 | 164 | samplecpy(ptr, s->bytestream, n, s->maxval); |
| 164 | 165 | else if (upgrade == 1) { |
| 165 | 166 | unsigned int j, f = (255 * 128 + s->maxval / 2) / s->maxval; |