18 lines
935 B
Plaintext
18 lines
935 B
Plaintext
$OpenBSD: patch-lib_ytnef_c,v 1.1 2019/11/07 10:33:52 robert Exp $
|
|
|
|
this allocation check is just useless especially with big winmail.dat files
|
|
so disable it to actually make the software usable
|
|
|
|
Index: lib/ytnef.c
|
|
--- lib/ytnef.c.orig
|
|
+++ lib/ytnef.c
|
|
@@ -55,7 +55,7 @@
|
|
|
|
#define MIN(x,y) (((x)<(y))?(x):(y))
|
|
|
|
-#define PREALLOCCHECK(sz,max) { if(sz==0||(unsigned)sz>max) { printf("ERROR: invalid alloc size %u at %s : %i, suspected corruption (exceeded %i bytes)\n", (unsigned)sz, __FILE__, __LINE__, max); return(-1); } }
|
|
+#define PREALLOCCHECK(sz,max)
|
|
#define ALLOCCHECK(x) { if(!x) { printf("Out of Memory at %s : %i\n", __FILE__, __LINE__); return(-1); } }
|
|
#define ALLOCCHECK_CHAR(x) { if(!x) { printf("Out of Memory at %s : %i\n", __FILE__, __LINE__); return(NULL); } }
|
|
#define SIZECHECK(x) { if ((((char *)d - (char *)data) + x) > size) { printf("Corrupted file detected at %s : %i\n", __FILE__, __LINE__); return(-1); } }
|