[gobject-introspection] girparser: Avoid a crash with an unset transfer annotation



commit 2699d5116ab5aaf801521c0f6c96bda09a23fb15
Author: Colin Walters <walters verbum org>
Date:   Sun Oct 4 12:00:23 2015 -0400

    girparser: Avoid a crash with an unset transfer annotation
    
    Spotted by Coverity.
    
    https://bugzilla.gnome.org/show_bug.cgi?id=752549

 girepository/girparser.c |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/girepository/girparser.c b/girepository/girparser.c
index eb61e34..4c43e0a 100644
--- a/girepository/girparser.c
+++ b/girepository/girparser.c
@@ -1066,9 +1066,9 @@ start_instance_parameter (GMarkupParseContext *context,
 
   state_switch (ctx, STATE_PASSTHROUGH);
 
-  if (strcmp (transfer, "full") == 0)
+  if (g_strcmp0 (transfer, "full") == 0)
     transfer_full = TRUE;
-  else if (strcmp (transfer, "none") == 0)
+  else if (g_strcmp0 (transfer, "none") == 0)
     transfer_full = FALSE;
   else
     {


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]