comparison libpurple/protocols/gg/gg.c @ 31915:566bed5c02f2

gg: Fix a null pointer dereference. This null pointer dereference caused a crash on Windows. Curiously, however, it resulted in an incorrect timestamp in the message log (no crash) on Linux. Fixes #10268. committer: John Bailey <rekkanoryo@rekkanoryo.org>
author tomkiewicz@o2.pl
date Sat, 16 Apr 2011 15:29:26 +0000
parents 277b7f1d6214
children 64d1be114e02
comparison
equal deleted inserted replaced
31914:8f91d3f76acd 31915:566bed5c02f2
1381 purple_debug_info("gg", "ggp_recv_image_handler: found message matching crc32: %s\n", (gchar *)entry->data); 1381 purple_debug_info("gg", "ggp_recv_image_handler: found message matching crc32: %s\n", (gchar *)entry->data);
1382 g_strfreev(split); 1382 g_strfreev(split);
1383 info->pending_richtext_messages = g_list_remove(info->pending_richtext_messages, entry->data); 1383 info->pending_richtext_messages = g_list_remove(info->pending_richtext_messages, entry->data);
1384 /* We don't have any more images to download */ 1384 /* We don't have any more images to download */
1385 if (strstr(text, "<IMG ID=\"IMGID_HANDLER") == NULL) { 1385 if (strstr(text, "<IMG ID=\"IMGID_HANDLER") == NULL) {
1386 gchar *buf = g_strdup_printf("%lu", (unsigned long int)ev->event.msg.sender); 1386 gchar *buf = g_strdup_printf("%lu", (unsigned long int)ev->event.image_reply.sender);
1387 serv_got_im(gc, buf, text, PURPLE_MESSAGE_IMAGES, ev->event.msg.time); 1387 serv_got_im(gc, buf, text, PURPLE_MESSAGE_IMAGES, time(NULL));
1388 g_free(buf); 1388 g_free(buf);
1389 purple_debug_info("gg", "ggp_recv_image_handler: richtext message: %s\n", text); 1389 purple_debug_info("gg", "ggp_recv_image_handler: richtext message: %s\n", text);
1390 g_free(text); 1390 g_free(text);
1391 break; 1391 break;
1392 } 1392 }