mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-02-17 07:33:57 +00:00
fix(tnef): add protection against malformed winmail.dat
This commit is contained in:
@@ -291,6 +291,11 @@ unsigned char GetRruleMonthNum(unsigned char a, unsigned char b) {
|
||||
partName = nil;
|
||||
data = [self fetchBLOB];
|
||||
|
||||
if((int)[data length] < sizeof(DWORD)) {
|
||||
NSLog(@"TNEF: ERROR try to decode empty data where it should'nt");
|
||||
return;
|
||||
}
|
||||
|
||||
memcpy(&signature, [data bytes], sizeof(DWORD));
|
||||
if (TNEFCheckForSignature(signature) == 0)
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user