From dfdf98d2f7d969f0295d940e7101befd2dbaf7a3 Mon Sep 17 00:00:00 2001 From: Tatsuhiro Tsujikawa Date: Wed, 16 Mar 2011 12:53:40 +0900 Subject: [PATCH] Fixed segmentation fault when JSON-RPC request cannot be parsed or is invalid. --- src/HttpServerBodyCommand.cc | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/src/HttpServerBodyCommand.cc b/src/HttpServerBodyCommand.cc index a545b1f6..ff086771 100644 --- a/src/HttpServerBodyCommand.cc +++ b/src/HttpServerBodyCommand.cc @@ -232,8 +232,7 @@ bool HttpServerBodyCommand::execute() getCuid()), e); rpc::RpcResponse res - (createJsonRpcErrorResponse - (-32700, "Parse error.", SharedHandle())); + (createJsonRpcErrorResponse(-32700, "Parse error.", Null::g())); sendJsonRpcResponse(res, callback); return true; } @@ -258,7 +257,7 @@ bool HttpServerBodyCommand::execute() } else { rpc::RpcResponse res (createJsonRpcErrorResponse - (-32600, "Invalid Request.", SharedHandle())); + (-32600, "Invalid Request.", Null::g())); sendJsonRpcResponse(res, callback); } }