Conditional jump or move depends on uninitialised value(s)
Philip Van Hoof <[email protected]> Wed, 27 Jun 2007 10:57:47 +0200
| Newsgroups | gmane.comp.gnome.evolution.patches |
|---|---|
| Message-ID | <1182934667.7943.13.camel@schtrumpf> |
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 _______________________________________________ Evolution-patches mailing list [email protected] http://mail.gnome.org/mailman/listinfo/evolution-patches
valgrind.diff
(text/x-patch, 729 B)
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