[gnome-bluetooth] Fix invalid memory access in agent.c



commit 99b975a732522a538c4d297c4d975b3ba9ed0deb
Author: Bastien Nocera <hadess hadess net>
Date:   Thu Sep 17 17:47:37 2009 +0100

    Fix invalid memory access in agent.c
    
    Which would happen when long name isn't requested, and there's
    no name for the device, just the address.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=595486

 applet/agent.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/applet/agent.c b/applet/agent.c
index 09c85f9..cb00333 100644
--- a/applet/agent.c
+++ b/applet/agent.c
@@ -458,7 +458,7 @@ device_get_name(DBusGProxy *proxy, char **long_name)
 
 	if (g_strcmp0 (alias, address) == 0) {
 		g_free (alias);
-		if (*long_name)
+		if (long_name != NULL)
 			*long_name = g_strdup_printf ("'%s'", address);
 		return address;
 	}



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