GNOME Bugzilla – Bug 708318
json_path_compile() crashes on NULL expression
Last modified: 2013-09-19 08:27:13 UTC
When passing a NULL expresssion, json_path_compile() crashes, because it is not checking if expression can be NULL.
Created attachment 255238 [details] [review] path: Check if JSONPath expression is NULL
Review of attachment 255238 [details] [review]: ::: json-glib/json-path.c @@ +423,3 @@ + if (p == NULL) { + g_set_error_literal (error, JSON_PATH_ERROR, coding style: braces go on a new line and indentation level. I also don't think this is a recoverable error: we should just return if the string is NULL. the empty string "" is a valid path.
Created attachment 255261 [details] [review] path: Check if JSONPath expression is NULL
Review of attachment 255261 [details] [review]: looks good. feel free to commit to both master and json-glib-0-16 branches.
Attachment 255261 [details] pushed as ce46c06 - path: Check if JSONPath expression is NULL