better error case decoding corrupt encoded word in header

git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@23485 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
Richard Frith-MacDonald 2006-09-13 05:32:53 +00:00
parent 8c9c0bbaea
commit e176abe621
2 changed files with 8 additions and 1 deletions

View file

@ -1,3 +1,9 @@
2006-09-13 Richard Frith-Macdonald <rfm@gnu.org>
* Source/Additions/GSMime.m: When decoding a corrupt encoded word
in a header, abandon processing of the header without appending
any decoded data.
2006-09-10 Richard Frith-Macdonald <rfm@gnu.org>
* Source/NSTimeZone.m: Remove unnecessary check on fiel name as

View file

@ -2312,12 +2312,13 @@ NSDebugMLLog(@"GSMime", @"Header parsed - %@", info);
}
dst = decodeWord(dst, src, tmp, encoding);
tmp++;
src = tmp;
if (*tmp != '=')
{
NSLog(@"Bad encoded word - encoded word terminator missing");
dst = beg; // Don't append to string.
break;
}
src = tmp;
if (dst > beg)
{
s = [NSStringClass allocWithZone: NSDefaultMallocZone()];