From a24fa3e3053eccae3981c7a1bf3995d0e67b1036 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?P=C5=99emysl=20Janouch?= Date: Mon, 29 Sep 2014 20:40:14 +0200 Subject: Don't try to send an empty method name --- json-rpc-shell.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/json-rpc-shell.c b/json-rpc-shell.c index 9edb937..149afa2 100644 --- a/json-rpc-shell.c +++ b/json-rpc-shell.c @@ -494,6 +494,11 @@ process_input (struct app_context *ctx, char *user_input) char *p = input; while (*p && isspace_ascii (*p)) p++; + + // No input + if (!*p) + goto fail; + char *method = p; while (*p && !isspace_ascii (*p)) p++; -- cgit v1.2.3