From: Jay Freeman (saurik) Date: Sun, 12 Jan 2014 07:34:46 +0000 (-0800) Subject: Instantiating a struct using new should bbzero it. X-Git-Tag: v0.9.500~66 X-Git-Url: https://git.saurik.com/cycript.git/commitdiff_plain/ae0a1432a71604711f64b7223c4a1af97e9fb43d Instantiating a struct using new should bbzero it. --- 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) }