]> git.saurik.com Git - cycript.git/commitdiff
Instantiating a struct using new should bbzero it.
authorJay Freeman (saurik) <saurik@saurik.com>
Sun, 12 Jan 2014 07:34:46 +0000 (23:34 -0800)
committerJay Freeman (saurik) <saurik@saurik.com>
Sun, 12 Jan 2014 07:35:07 +0000 (23:35 -0800)
Execute.cpp

index f21d6da216d9881dd287d30074540b997518a581..fda1eba7cb64f9a3673120e56bd5b596f6c34eca 100644 (file)
@@ -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) }