mirror of
https://github.com/gnustep/libs-base.git
synced 2025-04-23 00:41:02 +00:00
Add missing checks to avoid calling caseInsensitiveCompare: with nil
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@40086 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
e6cef4a7f9
commit
ef5fd8a497
2 changed files with 12 additions and 4 deletions
|
@ -1,3 +1,9 @@
|
|||
2016-09-16 Wolfgang Lux <wolfgang.lux@gmail.com>
|
||||
|
||||
* Source/Additions/GSMime.m (convertTo7BitSafe):
|
||||
Add missing checks to avoid calling caseInsensitiveCompare: with a
|
||||
nil argument.
|
||||
|
||||
2016-09-16 Niels Grewe <niels.grewe@halbordnung.de>
|
||||
|
||||
* Source/GSTLS.m: Fix bug removing mapped certificates.
|
||||
|
|
|
@ -5854,8 +5854,9 @@ appendString(NSMutableData *m, NSUInteger offset, NSUInteger fold,
|
|||
* When there is a header, there are trwo possible 8bit encodings
|
||||
* that we need to deal with...
|
||||
*/
|
||||
if ([CteBinary caseInsensitiveCompare: v] == NSOrderedSame
|
||||
|| [Cte8bit caseInsensitiveCompare: v] == NSOrderedSame)
|
||||
if (v != nil
|
||||
&& ([CteBinary caseInsensitiveCompare: v] == NSOrderedSame
|
||||
|| [Cte8bit caseInsensitiveCompare: v] == NSOrderedSame))
|
||||
{
|
||||
GSMimeHeader *t = [self headerNamed: @"content-type"];
|
||||
NSString *charset = [t parameterForKey: @"charset"];
|
||||
|
@ -5945,8 +5946,9 @@ appendString(NSMutableData *m, NSUInteger offset, NSUInteger fold,
|
|||
GSMimeHeader *h = [self headerNamed: @"content-transfer-encoding"];
|
||||
NSString *v = [h value];
|
||||
|
||||
if ([CteBase64 caseInsensitiveCompare: v] == NSOrderedSame
|
||||
|| [CteQuotedPrintable caseInsensitiveCompare: v] == NSOrderedSame)
|
||||
if (v != nil
|
||||
&& ([CteBase64 caseInsensitiveCompare: v] == NSOrderedSame
|
||||
|| [CteQuotedPrintable caseInsensitiveCompare: v] == NSOrderedSame))
|
||||
{
|
||||
[h setValue: CteBinary];
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue