[FFmpeg-cvslog] subviewer: sanitize packets.

Clément Bœsch ubitux at gmail.com
Sun Jan 6 04:05:51 CET 2013


On Sun, Jan 06, 2013 at 03:51:58AM +0100, Michael Niedermayer wrote:
[...]
> >  static int subviewer_decode_frame(AVCodecContext *avctx,
> >                                    void *data, int *got_sub_ptr, AVPacket *avpkt)
> >  {
> > +    char c;
> >      AVSubtitle *sub = data;
> >      const char *ptr = avpkt->data;
> >      AVBPrint buf;
> >  
> > +    /* To be removed later */
> > +    if (sscanf(ptr, "%*u:%*u:%*u.%*u,%*u:%*u:%*u.%*u%c", &c) == 1) {
> 
> you derefernce ptr here while a few lines later there is a ptr"==NULL"
> check
> (CID966647)
> 

Thanks, fixed.

-- 
Clément B.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 490 bytes
Desc: not available
URL: <http://ffmpeg.org/pipermail/ffmpeg-cvslog/attachments/20130106/31f78ff1/attachment.asc>


More information about the ffmpeg-cvslog mailing list