DWORD temp_dword;
DDWORD temp_ddword;
int count=-1;
- int offset;
d = data;
p->count = SwapDWord(data);
// Make sure to read in a multiple of 4
num = vl->size;
- offset = ((num % 4) ? (4 - num%4) : 0);
d += num + ((num % 4) ? (4 - num%4) : 0);
break;
if ((d-data) < size) {
if (TNEF->Debug >= 1) {
printf("ERROR DURING MAPI READ\n");
- printf("Read %i bytes, Expected %i bytes\n", (d-data), size);
- printf("%i bytes missing\n", size - (d-data));
+ printf("Read %ld bytes, Expected %u bytes\n", (d-data), size);
+ printf("%ld bytes missing\n", size - (d-data));
}
} else if ((d-data) > size){
if (TNEF->Debug >= 1) {
printf("ERROR DURING MAPI READ\n");
- printf("Read %i bytes, Expected %i bytes\n", (d-data), size);
- printf("%i bytes extra\n", (d-data)-size);
+ printf("Read %ld bytes, Expected %u bytes\n", (d-data), size);
+ printf("%ld bytes extra\n", (d-data)-size);
}
}
return;
}
int IsCompressedRTF(variableLength *p) {
+/*
unsigned int in;
unsigned char *src;
ULONG compressedSize, uncompressedSize, magic, crc32;
} else {
return 0;
}
+*/
+ unsigned char *src = p->data;
+ ULONG magic = SwapDWord(src + 8);
+
+ if (magic == 0x414c454d || magic == 0x75465a4c)
+ return 1;
+
+ return 0;
}
void MAPIPrint(MAPIProps *p)
unsigned int in;
unsigned int out;
variableLength comp_Prebuf;
- ULONG compressedSize, uncompressedSize, magic, crc32;
+ ULONG compressedSize, uncompressedSize, magic; // , crc32;
comp_Prebuf.size = strlen(RTF_PREBUF);
comp_Prebuf.data = calloc(comp_Prebuf.size + 1, 1);
in += 4;
magic = SwapDWord(src+in);
in += 4;
- crc32 = SwapDWord(src+in);
+ // crc32 = SwapDWord(src+in);
in += 4;
// check size excluding the size field itself