mirror of
https://github.com/inverse-inc/sogo.git
synced 2026-11-18 06:11:20 +00:00
fix(tnef): add protection against malformed winmail.dat
This commit is contained in:
1 parent
4be3ba227c
commit
7c6b6743e0
1 file changed
+5
@@ -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