aboutsummaryrefslogtreecommitdiff
path: root/libsylph/procmime.c
diff options
context:
space:
mode:
authorhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2006-09-13 07:14:28 +0000
committerhiro <hiro@ee746299-78ed-0310-b773-934348b2243d>2006-09-13 07:14:28 +0000
commitc9865e35f9eaca97abb9369c888535cf007838b4 (patch)
tree43485b03ede45154745518aef1b7e3a63690cd47 /libsylph/procmime.c
parentd7ea96a449049db7de8e92d135b1d961c523a351 (diff)
fflush() stream before rewind() to ensure error checking.
git-svn-id: svn://sylpheed.sraoss.jp/sylpheed/trunk@1156 ee746299-78ed-0310-b773-934348b2243d
Diffstat (limited to 'libsylph/procmime.c')
-rw-r--r--libsylph/procmime.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/libsylph/procmime.c b/libsylph/procmime.c
index 98088ad6..81e5829a 100644
--- a/libsylph/procmime.c
+++ b/libsylph/procmime.c
@@ -1119,6 +1119,11 @@ FILE *procmime_get_text_content(MimeInfo *mimeinfo, FILE *infp,
g_warning(_("procmime_get_text_content(): Code conversion failed.\n"));
fclose(tmpfp);
+ if (fflush(outfp) == EOF) {
+ perror("fflush");
+ fclose(outfp);
+ return NULL;
+ }
rewind(outfp);
return outfp;