pidgin: 1a03b83d: Fix for accessing uninitialized memory

nosnilmot at pidgin.im nosnilmot at pidgin.im
Wed Mar 12 21:40:59 EDT 2008


-----------------------------------------------------------------
Revision: 1a03b83dbe8f941cb6de4ed3659bf7b2335d642d
Ancestor: 277f3d0a61446be2d92f29d1abdfaccb52e63826
Author: nosnilmot at pidgin.im
Date: 2008-03-13T01:23:00
Branch: im.pidgin.pidgin
URL: http://d.pidgin.im/viewmtn/revision/info/1a03b83dbe8f941cb6de4ed3659bf7b2335d642d

Modified files:
        pidgin/plugins/cap/cap.c

ChangeLog: 

Fix for accessing uninitialized memory

-------------- next part --------------
============================================================
--- pidgin/plugins/cap/cap.c	ab897523fda373afe352cc2d86778ad496c98f50
+++ pidgin/plugins/cap/cap.c	d07e130cbd3e0a295ad24e44c0ec9f1f2dfd47d6
@@ -113,11 +113,8 @@ static CapStatistics * get_stats_for(Pur
 
 	stats = g_hash_table_lookup(_buddy_stats, buddy->name);
 	if(!stats) {
-		stats = g_malloc(sizeof(CapStatistics));
+		stats = g_malloc0(sizeof(CapStatistics));
 		stats->last_message = -1;
-		stats->last_message_status_id = NULL;
-		stats->last_status_id = NULL;
-		stats->prediction = NULL;
 		stats->buddy = buddy;
 		stats->last_seen = -1;
 		stats->last_status_id = "";


More information about the Commits mailing list