aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-mime-parser.c
diff options
context:
space:
mode:
authorMatthew Loper <mloper@src.gnome.org>2000-07-27 05:02:08 +0800
committerMatthew Loper <mloper@src.gnome.org>2000-07-27 05:02:08 +0800
commited21f552bbad288dd7963f859df11870509cbc27 (patch)
tree0ff5b6c36e0a8c6b0ebe336c020f7e0224314009 /camel/camel-mime-parser.c
parent490437a88464f7be839ae646970e3219b04b1562 (diff)
downloadgsoc2013-evolution-ed21f552bbad288dd7963f859df11870509cbc27.tar
gsoc2013-evolution-ed21f552bbad288dd7963f859df11870509cbc27.tar.gz
gsoc2013-evolution-ed21f552bbad288dd7963f859df11870509cbc27.tar.bz2
gsoc2013-evolution-ed21f552bbad288dd7963f859df11870509cbc27.tar.lz
gsoc2013-evolution-ed21f552bbad288dd7963f859df11870509cbc27.tar.xz
gsoc2013-evolution-ed21f552bbad288dd7963f859df11870509cbc27.tar.zst
gsoc2013-evolution-ed21f552bbad288dd7963f859df11870509cbc27.zip
Make the mime parser a bit less reckless. More reckful?
svn path=/trunk/; revision=4365
Diffstat (limited to 'camel/camel-mime-parser.c')
-rw-r--r--camel/camel-mime-parser.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/camel/camel-mime-parser.c b/camel/camel-mime-parser.c
index 9e49effa6c..5917cfda2a 100644
--- a/camel/camel-mime-parser.c
+++ b/camel/camel-mime-parser.c
@@ -1152,7 +1152,7 @@ retry:
}
/* we always have at least _1_ char here ... */
- if (s->outptr[-1] == '\n')
+ if (s->outptr > s->outbuf && s->outptr[-1] == '\n')
s->outptr--;
s->outptr[0] = 0;
@@ -1383,6 +1383,7 @@ folder_scan_init(void)
s->stream = NULL;
s->outbuf = g_malloc(1024);
+ s->outbuf[0] = '\0';
s->outptr = s->outbuf;
s->outend = s->outbuf+1024;