From ae0a1432a71604711f64b7223c4a1af97e9fb43d Mon Sep 17 00:00:00 2001 From: "Jay Freeman (saurik)" Date: Sat, 11 Jan 2014 23:34:46 -0800 Subject: [PATCH] Instantiating a struct using new should bbzero it. --- Execute.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Execute.cpp b/Execute.cpp index f21d6da..fda1eba 100644 --- a/Execute.cpp +++ b/Execute.cpp @@ -1204,7 +1204,7 @@ static JSObjectRef Type_callAsConstructor(JSContextRef context, JSObjectRef obje type = type->data.data.type; } - void *value(malloc(internal->GetFFI()->size)); + void *value(calloc(1, internal->GetFFI()->size)); return CYMakePointer(context, value, length, type, NULL, NULL); } CYCatch(NULL) } -- 2.45.2