Crash in nm-pptp-service.c
- From: Eivind Naess <eivnaes yahoo com>
- To: networkmanager-list gnome org
- Subject: Crash in nm-pptp-service.c
- Date: Sat, 2 Apr 2011 12:08:15 -0700 (PDT)
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()..
- 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);
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]