diff options
author | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2006-09-13 07:14:28 +0000 |
---|---|---|
committer | hiro <hiro@ee746299-78ed-0310-b773-934348b2243d> | 2006-09-13 07:14:28 +0000 |
commit | c9865e35f9eaca97abb9369c888535cf007838b4 (patch) | |
tree | 43485b03ede45154745518aef1b7e3a63690cd47 /libsylph/procmime.c | |
parent | d7ea96a449049db7de8e92d135b1d961c523a351 (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.c | 5 |
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; |