From 6264d3d94b1ba827a507433efa630d92145cb3cb Mon Sep 17 00:00:00 2001 From: Harald Welte Date: Sun, 18 Jul 2010 23:30:11 +0200 Subject: we have to replace calloc with talloc_zero_size() to ensure initialization --- asn1c-talloc.patch | 2 +- include/asn1c/asn_internal.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/asn1c-talloc.patch b/asn1c-talloc.patch index f0a32b0..909772f 100644 --- a/asn1c-talloc.patch +++ b/asn1c-talloc.patch @@ -21,7 +21,7 @@ index 67f055a..45b1adb 100644 -#define FREEMEM(ptr) free(ptr) +extern void *talloc_asn1_ctx; + -+#define CALLOC(nmemb, size) talloc_size(talloc_asn1_ctx, (nmemb) * (size)) ++#define CALLOC(nmemb, size) talloc_zero_size(talloc_asn1_ctx, (nmemb) * (size)) +#define MALLOC(size) talloc_size(talloc_asn1_ctx, size) +#define REALLOC(oldptr, size) talloc_realloc_size(talloc_asn1_ctx, oldptr, size) +#define FREEMEM(ptr) talloc_free(ptr) diff --git a/include/asn1c/asn_internal.h b/include/asn1c/asn_internal.h index 47f9930..c03dc6b 100644 --- a/include/asn1c/asn_internal.h +++ b/include/asn1c/asn_internal.h @@ -27,7 +27,7 @@ int get_asn1c_environment_version(void); /* Run-time version */ extern void *talloc_asn1_ctx; -#define CALLOC(nmemb, size) talloc_size(talloc_asn1_ctx, (nmemb) * (size)) +#define CALLOC(nmemb, size) talloc_zero_size(talloc_asn1_ctx, (nmemb) * (size)) #define MALLOC(size) talloc_size(talloc_asn1_ctx, size) #define REALLOC(oldptr, size) talloc_realloc_size(talloc_asn1_ctx, oldptr, size) #define FREEMEM(ptr) talloc_free(ptr) -- cgit v1.2.3