freebsd-ports/mail/libvmime/files/patch-src__utility__stringUtils.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
386 B
C++

--- ./src/utility/stringUtils.cpp.orig 2008-10-12 02:11:24.000000000 -0700
+++ ./src/utility/stringUtils.cpp 2009-12-08 09:48:30.547226336 -0800
@@ -142,7 +142,7 @@
{
if (parserHelpers::isAscii(*i))
{
- if (*i != '=' || *(i + 1) != '?') // To avoid bad behaviour...
+ if (*i != '=' || ((i + 1) != end && *(i + 1) != '?')) // To avoid bad behaviour...
++count;
}
}