diff options
author | Matthias Benkard <code@mail.matthias.benkard.de> | 2008-03-04 15:50:45 +0100 |
---|---|---|
committer | Matthias Benkard <code@mail.matthias.benkard.de> | 2008-03-04 15:50:45 +0100 |
commit | ff1af1b0a3a0c76678c24327069e611055f2580c (patch) | |
tree | 7f8df23235c4eaab68a32ec8410cf9b782a8048f /Objective-C | |
parent | 69cf14b4e5ade03daf57657ad1adafc3275bd5da (diff) |
Fix yet another case of misguided stack allocation in objcl_create_imp.
darcs-hash:7bd889d82688e8fc94e3086aab3d15d74eb5b5eb
Diffstat (limited to 'Objective-C')
-rw-r--r-- | Objective-C/libobjcl.m | 4 |
1 files changed, 3 insertions, 1 deletions
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; |