Blame SOURCES/autotrace-0.31.1-CVE-2019-19005.patch

b7cf7d
diff -urN autotrace-0.31.1.old/xstd.h autotrace-0.31.1/xstd.h
b7cf7d
--- autotrace-0.31.1.old/xstd.h	2002-10-11 02:14:17.000000000 +0530
b7cf7d
+++ autotrace-0.31.1/xstd.h	2021-04-30 15:22:25.853589944 +0530
b7cf7d
@@ -20,6 +20,7 @@
b7cf7d
 #define XMALLOC(new_mem, size)			\
b7cf7d
 do						\
b7cf7d
   {						\
b7cf7d
+    assert(size);                              \
b7cf7d
     new_mem = (at_address) malloc (size);	\
b7cf7d
     assert(new_mem);				\
b7cf7d
   } while (0)
b7cf7d
@@ -28,6 +29,7 @@
b7cf7d
 #define XCALLOC(new_mem, size)			\
b7cf7d
 do						\
b7cf7d
   {						\
b7cf7d
+    assert(size);                              \
b7cf7d
     new_mem = (at_address) calloc (size, 1);	\
b7cf7d
     assert(new_mem);				\
b7cf7d
   } while (0)
b7cf7d
@@ -55,6 +57,7 @@
b7cf7d
 #define XMALLOC(new_mem, size)					\
b7cf7d
 do								\
b7cf7d
   {								\
b7cf7d
+    assert(size);                                              \
b7cf7d
     (at_address&)(new_mem) = (at_address) malloc (size);	\
b7cf7d
      assert(new_mem);						\
b7cf7d
   } while (0) 
b7cf7d
@@ -63,6 +66,7 @@
b7cf7d
 #define XCALLOC(new_mem, sizex)					\
b7cf7d
 do								\
b7cf7d
   {								\
b7cf7d
+    assert(size);                                              \
b7cf7d
     (at_address&)(new_mem) = (void *) calloc (sizex, 1);	\
b7cf7d
     assert(new_mem);						\
b7cf7d
   } while (0)