[FFmpeg-devel] [PATCH] lavf/img2dec: add pnm pipe demuxers
    Clément Bœsch 
    u at pkh.me
       
    Wed Jun 22 15:28:34 CEST 2016
    
    
  
On Wed, Jun 22, 2016 at 11:56:43AM +0200, Michael Niedermayer wrote:
> On Wed, Jun 22, 2016 at 10:28:14AM +0200, Clément Bœsch wrote:
> > 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'
> 
> patch ok
> 
applied, thanks
> maybe the zeroness of the padding should be checked somewhere
> 
-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 473 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-devel/attachments/20160622/75fbb9fa/attachment.sig>
    
    
More information about the ffmpeg-devel
mailing list