5 Sep
2016
5 Sep
'16
8:26 a.m.
On 9/5/16, Carl Eugen Hoyos <ceffmpeg@gmail.com> wrote:
2016-09-05 9:21 GMT+02:00 Michael Niedermayer <michael@niedermayer.cc>:
On Sun, Sep 04, 2016 at 08:58:44PM +0200, Carl Eugen Hoyos wrote:
@@ -159,6 +163,8 @@ static int pnm_decode_frame(AVCodecContext *avctx, void *data, } }else{ for (i = 0; i < avctx->height; i++) { + if (s->bytestream + n > s->bytestream_end) + continue;
having a pointer point outside of 0..array length is undefined behaviour (and can overflow in principle)
New patch attached.
It seems this patch disables check for all cases when experimental is enabled, but check for overflow in only one case.