projects
/
platform
/
upstream
/
gobject-introspection.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8f252ab
)
protect on null retval
author
Saleem Abdulrasool
<compnerd@compnerd.org>
Sun, 13 Dec 2009 19:53:04 +0000
(11:53 -0800)
committer
Johan Dahlin
<johan@gnome.org>
Tue, 15 Dec 2009 13:01:55 +0000
(11:01 -0200)
ffi_call does not protect against retval being NULL, resulting in a segfault.
https://bugzilla.gnome.org/show_bug.cgi?id=604472
girepository/ginvoke.c
patch
|
blob
|
history
diff --git
a/girepository/ginvoke.c
b/girepository/ginvoke.c
index 70d81f8e92a99c5158ff0abeed22804b0430124b..136860c909882f2074dab998a1936f1a277278c8 100644
(file)
--- a/
girepository/ginvoke.c
+++ b/
girepository/ginvoke.c
@@
-247,6
+247,7
@@
g_function_info_invoke (GIFunctionInfo *info,
if (ffi_prep_cif (&cif, FFI_DEFAULT_ABI, n_invoke_args, rtype, atypes) != FFI_OK)
goto out;
+ g_return_val_if_fail (return_value, FALSE);
ffi_call (&cif, func, return_value, args);
if (local_error)
@@
-435,6
+436,7
@@
gi_cclosure_marshal_generic (GClosure *closure,
if (ffi_prep_cif (&cif, FFI_DEFAULT_ABI, n_args, rtype, atypes) != FFI_OK)
return;
+ g_return_val_if_fail (rvalue, FALSE);
ffi_call (&cif, marshal_data ? marshal_data : cc->callback, rvalue, args);
if (return_gvalue && G_VALUE_TYPE (return_gvalue))