aboutsummaryrefslogtreecommitdiffstats
path: root/camel/camel-mime-parser.c
diff options
context:
space:
mode:
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;