changeset 13579:ffb752f106ec

[gaim-migrate @ 15961] crash fix for invalid mime images committer: Tailor Script <tailor@pidgin.im>
author Christopher O'Brien <siege@pidgin.im>
date Tue, 04 Apr 2006 21:33:46 +0000
parents 8dfe7742739b
children dc28bca6a7b5
files src/protocols/sametime/sametime.c
diffstat 1 files changed, 4 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/src/protocols/sametime/sametime.c	Thu Mar 30 00:38:49 2006 +0000
+++ b/src/protocols/sametime/sametime.c	Tue Apr 04 21:33:46 2006 +0000
@@ -2700,14 +2700,16 @@
 				       (const char **) &end, &attribs)) {
 
       char *alt, *align, *border, *src;
-      int img;
+      int img = 0;
 
       alt = g_datalist_get_data(&attribs, "alt");
       align = g_datalist_get_data(&attribs, "align");
       border = g_datalist_get_data(&attribs, "border");
       src = g_datalist_get_data(&attribs, "src");
 
-      img = GPOINTER_TO_INT(g_hash_table_lookup(img_by_cid, src));
+      if(src)
+	img = GPOINTER_TO_INT(g_hash_table_lookup(img_by_cid, src));
+
       if(img) {
 	GString *atstr;
 	gsize len = (end - start);