gobjectification: 97b336e9: Use purple_status_get_attr_string() rath...

resiak at pidgin.im resiak at pidgin.im
Wed Jul 9 06:05:51 EDT 2008


-----------------------------------------------------------------
Revision: 97b336e977b93484683eb8e837bfad7fe881c7c3
Ancestor: c504408b67e3c35dff5bf5671f86733e36de98b0
Author: resiak at pidgin.im
Date: 2008-07-06T20:06:47
Branch: im.pidgin.gobjectification
URL: http://d.pidgin.im/viewmtn/revision/info/97b336e977b93484683eb8e837bfad7fe881c7c3

Modified files:
        libpurple/server.c

ChangeLog: 

Use purple_status_get_attr_string() rather than purple_status_get_attr_value()
followed by purple_value_get_string().  I think this fixes a hypothetical null
pointer dereference if the former returns NULL and someone compiles the latter
wwith G_DISABLE_CHECKS.

-------------- next part --------------
============================================================
--- libpurple/server.c	4adfa859b837848faf2400a3043d222a9980dd18
+++ libpurple/server.c	fbdf84d2c4d538ccdbca35058a6bdd5a9adab26f
@@ -748,8 +748,7 @@ void serv_got_im(PurpleConnection *gc, c
 			return;
 		}
 
-		away_msg = purple_value_get_string(
-			purple_status_get_attr_value(status, "message"));
+		away_msg = purple_status_get_attr_string(status, "message");
 
 		if ((away_msg != NULL) && (*away_msg != '\0')) {
 			struct last_auto_response *lar;


More information about the Commits mailing list