From ff1af1b0a3a0c76678c24327069e611055f2580c Mon Sep 17 00:00:00 2001 From: Matthias Benkard Date: Tue, 4 Mar 2008 15:50:45 +0100 Subject: Fix yet another case of misguided stack allocation in objcl_create_imp. darcs-hash:7bd889d82688e8fc94e3086aab3d15d74eb5b5eb --- Objective-C/libobjcl.m | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'Objective-C') diff --git a/Objective-C/libobjcl.m b/Objective-C/libobjcl.m index e6283d2..d1cce2a 100644 --- a/Objective-C/libobjcl.m +++ b/Objective-C/libobjcl.m @@ -707,7 +707,7 @@ objcl_create_imp (IMP callback, const char *arg_typespecs[]) { ffi_type *return_type; - ffi_type *arg_types[argc + 2]; + ffi_type **arg_types; ffi_status status; ffi_cif *cif; ffi_closure *closure; @@ -728,6 +728,8 @@ objcl_create_imp (IMP callback, return_type = objcl_pyobjc_signature_to_ffi_return_type (return_typespec); + arg_types = malloc ((argc+2) * sizeof (ffi_type *)); /* never freed */ + arg_types[0] = id_type; arg_types[1] = sel_type; -- cgit v1.2.3