[vlc-devel] [PATCH] gnutls: search CA in every known locations.

Rémi Denis-Courmont rem at videolan.org
Tue Jun 29 16:08:18 CEST 2010


On Tuesday 29 June 2010 15:31:23 Francois Cartegnie, you wrote:
> +        while(i_length-- > 0)
> +        {
> +            psz_path = calloc ( sizeof (char), 1 + strlen (confdir)
> +                                      + strlen (stdcafiles[i_length]) );

I think the stack can be used here. The path comes from the user configuration 
(and is typically hard-coded at build-time anyway).

> +            if (psz_path != NULL)
> +            {
> +                sprintf (psz_path, "%s%s", confdir, stdcafiles[i_length]);
> +                if (!vlc_stat (psz_path, &t_stat_lstat))

What's the point of this extra check anyway?


-- 
Rémi Denis-Courmont



More information about the vlc-devel mailing list