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

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