forked from osmocom/wireshark
sharkd: prevent a NULL pointer dereference (CID 1486264)
This commit is contained in:
parent
d317382464
commit
16f5269d54
|
@ -4839,6 +4839,12 @@ sharkd_session_process(char *buf, const jsmntok_t *tokens, int count)
|
|||
|
||||
const char* tok_method = json_find_attr(buf, tokens, count, "method");
|
||||
|
||||
if (!tok_method) {
|
||||
sharkd_json_error(
|
||||
rpcid, -32601, NULL,
|
||||
"No method found");
|
||||
return;
|
||||
}
|
||||
if (!strcmp(tok_method, "load"))
|
||||
sharkd_session_process_load(buf, tokens, count);
|
||||
else if (!strcmp(tok_method, "status"))
|
||||
|
|
Loading…
Reference in New Issue