diff options
Diffstat (limited to 'Frameworks')
-rw-r--r-- | Frameworks/SPMySQLFramework/Source/SPMySQLResult.m | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Frameworks/SPMySQLFramework/Source/SPMySQLResult.m b/Frameworks/SPMySQLFramework/Source/SPMySQLResult.m index 5b14dc20..5f54960c 100644 --- a/Frameworks/SPMySQLFramework/Source/SPMySQLResult.m +++ b/Frameworks/SPMySQLFramework/Source/SPMySQLResult.m @@ -321,6 +321,8 @@ static id NSNullPointer; - (NSString *)_lossyStringWithBytes:(const void *)bytes length:(NSUInteger)length wasLossy:(BOOL *)outLossy { + if(!bytes || !length) return @""; //to match -[NSString initWithBytes:length:encoding:] + //mysql protocol limits column names to 256 bytes. //with inline columns and multibyte charsets this can result in a character //being split in half at which the method above will fail. |