From d3173824649743f33cb74f8876fd2fb46582f6ef Mon Sep 17 00:00:00 2001 From: Pascal Quantin Date: Tue, 22 Jun 2021 16:52:48 +0200 Subject: [PATCH] sharkd: fix JSON boolean sanity check (CID 1486263) --- sharkd_session.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sharkd_session.c b/sharkd_session.c index 3ef89e1832..3c88feba80 100644 --- a/sharkd_session.c +++ b/sharkd_session.c @@ -603,7 +603,7 @@ json_prep(char* buf, const jsmntok_t* tokens, int count) } else if (name_array[j].type == JSMN_PRIMITIVE && name_array[j].value_type == SHARKD_JSON_BOOLEAN) { - if (!strcmp(attr_value, "true") && !strcmp(attr_value, "false")) + if (strcmp(attr_value, "true") && strcmp(attr_value, "false")) { sharkd_json_error( rpcid, -32600, NULL,