[sylpheed:30024] Re: Lost mail if no space left on device

Hiroyuki Yamamoto hiro-y at kcn.ne.jp
Wed Sep 13 13:23:22 ICT 2006


Hello,

On Wed, 23 Aug 2006 16:19:06 +0300
Serhii Piddubchak <dusoft at developingcentral.com> wrote:

> Hi there. I didn't found where to post bug report, i think it is a
> bug, so i'll post here. I've a little space on my home partition, and
> sometimes it becomes full, and, when sylpheed receives some mail for
> me, it can't write a message to disk, it displays it with no subject,
> no date, with nothing, but deletes it from server (my settings
> do so), resulting in a loss of my email. 

I think I've found where an error checking was missing.

In session.c::session_read_data_as_file_cb(), file stream was not
flushed before calling rewind().

This could be a problem because fwrite() succeeds when data size is
small even if there is no disk space. Then, after rewind(), fgets()
etc. silently fails (ferror() can't detect error in this case) and an
empty file is generated.

I've added fflush() before rewind() to ensure the error detection, so
it will be fixed in the next release.

-- 
Hiroyuki Yamamoto <hiro-y at kcn.ne.jp>


More information about the Sylpheed mailing list