On Mon, Jun 20, 2016 at 04:39:47PM +0200, Michael Niedermayer wrote:
[...]
> > +static inline int pnm_probe(const AVProbeData *p)
> > +{
> > +    const uint8_t *b = p->buf;
> > +
> > +    while (b[2] == '\r')
> > +        b++;
> 
> shouldnt this check buf_size ?
> 

Inside AVProbeData struct declaration:
  unsigned char *buf; /**< Buffer must have AVPROBE_PADDING_SIZE of extra 
allocated bytes filled with zero. */

So in the worst case it will reach a zero, and then bail out because it's
not a '\n'

-- 
Clément B.

Attachment: signature.asc
Description: PGP signature

_______________________________________________
ffmpeg-devel mailing list
ffmpeg-devel@ffmpeg.org
http://ffmpeg.org/mailman/listinfo/ffmpeg-devel

Reply via email to