freebsd-ports/mail/libvmime/files/patch-src__platforms__posix__posixFile.cpp
Xin LI 8121e44e5f - Fix a possible segfault in stringUtils::countASCIIchars()
- Fix body contents not generating bug caused by stream::reset() won't
   reset EOF condition.

Obtained from:	vmime svn
2009-12-08 17:59:00 +00:00

11 lines
377 B
C++

--- ./src/platforms/posix/posixFile.cpp.orig 2008-10-12 02:42:23.000000000 -0700
+++ ./src/platforms/posix/posixFile.cpp 2009-12-08 09:48:30.536227969 -0800
@@ -166,7 +166,7 @@
if ((c = ::read(m_fd, data, count)) == -1)
posixFileSystemFactory::reportError(m_path, errno);
- if (c == 0)
+ if (c == 0 && count != 0)
m_eof = true;
return static_cast <size_type>(c);