Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion src/console/dlt-control-common.c
Original file line number Diff line number Diff line change
Expand Up @@ -728,7 +728,10 @@ DltReturnValue dlt_json_filter_load(DltFilter *filter, const char *filename, int
}

j_parsed_json = json_tokener_parse_verbose(buffer, &jerr);

if (json_object_get_type(j_parsed_json) != json_type_object) {
pr_error("Invalid JSON type, expected object\n");
return DLT_RETURN_ERROR;
}
if (jerr != json_tokener_success) {
pr_error("Faild to parse given filter %s: %s\n", filename, json_tokener_error_desc(jerr));
return DLT_RETURN_ERROR;
Expand Down