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



commit ce46c06d9c088501c8cbab2dba51856be1a05592
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 ed36ac1..014abeb 100644
--- a/json-glib/json-path.c
+++ b/json-glib/json-path.c
@@ -419,6 +419,8 @@ json_path_compile (JsonPath    *path,
   PathNode *root = NULL;
   GList *nodes;
 
+  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]