[vlc-devel] [PATCH] Smem Stream output module

Rémi Denis-Courmont remi at remlab.net
Thu Aug 20 19:19:53 CEST 2009


Le jeudi 20 août 2009 15:58:34 christophe courtaut, vous avez écrit :
> On Thu, Aug 20, 2009 at 2:08 PM, Rafaël Carré<rafael.carre at gmail.com> wrote:
> > On Thu, 20 Aug 2009 13:48:17 +0200
> > christophe courtaut <christophe.courtaut at gmail.com> wrote:
> >
> > Hi, i have a few small comments
> >
> >> From d51e0d64fb952f3b5f78c89ea12183dce7231806 Mon Sep 17 00:00:00 2001
> >> From: Christophe Courtaut <christophe.courtaut at gmail.com>
> >> Date: Fri, 31 Jul 2009 15:59:09 +0200
> >> Subject: [PATCH] Functionnal version of smem stream output module
> >>
> >> +    psz_tmp = var_CreateGetString( p_stream, SOUT_PREFIX_VIDEO
> >> "chroma" );
> >> +    memcpy( &p_sys->i_video_chroma, psz_tmp, 4 );
> >> +    free( psz_tmp );
> >
> > you should use strncpy to check psz_tmp len
>
> I now use strncpy, but strncpy does'nt allow you to check how many
> bytes where copied, as it returns a pointer to dest.

That's why we have strlcpy().
-- 
Rémi Denis-Courmont
http://www.remlab.net/



More information about the vlc-devel mailing list