[json-glib/json-glib-0-16] path: Check if JSONPath expression is NULL



commit d02564cdb908c0c76fb2a35f317a7a389b84746c
Author: Juan A. Suarez Romero <jasuarez igalia com>
Date:   Wed Sep 18 17:52:17 2013 +0000

    path: Check if JSONPath expression is NULL
    
    https://bugzilla.gnome.org/show_bug.cgi?id=708318

 json-glib/json-path.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)
---
diff --git a/json-glib/json-path.c b/json-glib/json-path.c
index 4fb61bc..5036702 100644
--- a/json-glib/json-path.c
+++ b/json-glib/json-path.c
@@ -358,6 +358,8 @@ json_path_compile (JsonPath    *path,
   PathNode *root = NULL;
   GList *nodes, *l;
 
+  g_return_val_if_fail (expression != NULL, FALSE);
+
   p = expression;
 
   while (*p != '\0')



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