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