Re: Crash in nm-pptp-service.c



On Sat, 2011-04-02 at 12:08 -0700, Eivind Naess wrote:
> All, 
> Looks like I ran into a crash with nm-pptp-service.c in latest git-head. The 
> call to strlen() did in my case cause a crash when priv->domain is set to NULL. 
> Simple patch as below checks for value of priv->domain before passing it to 
> strlen()..

d2fffd1ab969b2d5151531ea544d19153b5b6688 (master)
(and also cherry-picked to NM_0_8)

Thanks!
Dan

> - Eivind
> 
> 
> diff --git a/src/nm-pptp-service.c b/src/nm-pptp-service.c
> index 16f60d3..68a5759 100644
> --- a/src/nm-pptp-service.c
> +++ b/src/nm-pptp-service.c
> @@ -431,7 +431,7 @@ impl_pptp_service_need_secrets (NMPptpPppService *self,
>         }
>  
>         /* Success */
> -       if (strlen (priv->domain))
> +       if (priv->domain && strlen (priv->domain))
>                 *out_username = g_strdup_printf ("%s\\%s", priv->domain, 
> priv->username);
>         else
>                 *out_username = g_strdup (priv->username);
> _______________________________________________
> networkmanager-list mailing list
> networkmanager-list gnome org
> http://mail.gnome.org/mailman/listinfo/networkmanager-list




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]