[libpeas] Fix iteration of GCallable arguments
- From: Dan Williams <dcbw src gnome org>
 
- To: commits-list gnome org
 
- Cc: 
 
- Subject: [libpeas] Fix iteration of GCallable arguments
 
- Date: Tue,  2 Nov 2010 04:31:02 +0000 (UTC)
 
commit bb0cc262430d3ba9de06e86b76bf2c9520ddb335
Author: Dan Williams <dcbw redhat com>
Date:   Mon Nov 1 23:28:26 2010 -0500
    Fix iteration of GCallable arguments
    
    g_callable_info_get_n_args() returns gint, not guint.  So when
    g_callable_info_get_n_args() returns -1 for some reason (missing
    or bad introspection data) it got treated as a really big number,
    and libpeas would crash trying to free NULL GITypeInfo.
 libpeas/peas-introspection.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/libpeas/peas-introspection.c b/libpeas/peas-introspection.c
index e93ec51..2ddf8b0 100644
--- a/libpeas/peas-introspection.c
+++ b/libpeas/peas-introspection.c
@@ -31,7 +31,7 @@ peas_gi_valist_to_arguments (GICallableInfo *callable_info,
                              GIArgument     *arguments,
                              gpointer       *return_value)
 {
-  guint i, n_args;
+  gint i, n_args;
   GIArgInfo *arg_info;
   GITypeInfo *arg_type_info;
   GITypeInfo *retval_info;
[
Date Prev][
Date Next]   [
Thread Prev][
Thread Next]   
[
Thread Index]
[
Date Index]
[
Author Index]