[evolution-patches] Conditional jump or move depends on uninitialised value(s)



Based on what valgrind is giving me, I'm proposing this patch (attached). 

==25759== Conditional jump or move depends on uninitialised value(s)
==25759==    at 0x417BB66: folder_scan_content (camel-mime-parser.c:1353)
==25759==    by 0x417C032: folder_scan_step (camel-mime-parser.c:1662)

-- 
Philip Van Hoof, software developer
home: me at pvanhoof dot be 
gnome: pvanhoof at gnome dot org 
http://www.pvanhoof.be/blog



Index: libtinymail-camel/camel-lite/camel/camel-mime-parser.c
===================================================================
--- libtinymail-camel/camel-lite/camel/camel-mime-parser.c	(revision 2279)
+++ libtinymail-camel/camel-lite/camel/camel-mime-parser.c	(revision 2280)
@@ -1438,7 +1438,7 @@
 	s->outptr = s->outbuf;
 	s->outend = s->outbuf+1024;
 
-	s->realbuf = g_malloc(SCAN_BUF + SCAN_HEAD*2);
+	s->realbuf = g_malloc0 (SCAN_BUF + SCAN_HEAD*2);
 	s->inbuf = s->realbuf + SCAN_HEAD;
 	s->inptr = s->inbuf;
 	s->inend = s->inbuf;
@@ -1839,6 +1839,7 @@
 		s->scan_from = FALSE;
 #if 0
 		h = g_malloc0(sizeof(*h));
+		h->inptr = NULL;
 		h->savestate = CAMEL_MIME_PARSER_STATE_EOF;
 		folder_push_part(s, h);
 #endif	


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