mirror of https://github.com/aria2/aria2
Fixed segmentation fault when JSON-RPC request cannot be parsed or is
invalid.pull/1/head
parent
f999c2bcae
commit
dfdf98d2f7
|
@ -232,8 +232,7 @@ bool HttpServerBodyCommand::execute()
|
||||||
getCuid()),
|
getCuid()),
|
||||||
e);
|
e);
|
||||||
rpc::RpcResponse res
|
rpc::RpcResponse res
|
||||||
(createJsonRpcErrorResponse
|
(createJsonRpcErrorResponse(-32700, "Parse error.", Null::g()));
|
||||||
(-32700, "Parse error.", SharedHandle<ValueBase>()));
|
|
||||||
sendJsonRpcResponse(res, callback);
|
sendJsonRpcResponse(res, callback);
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -258,7 +257,7 @@ bool HttpServerBodyCommand::execute()
|
||||||
} else {
|
} else {
|
||||||
rpc::RpcResponse res
|
rpc::RpcResponse res
|
||||||
(createJsonRpcErrorResponse
|
(createJsonRpcErrorResponse
|
||||||
(-32600, "Invalid Request.", SharedHandle<ValueBase>()));
|
(-32600, "Invalid Request.", Null::g()));
|
||||||
sendJsonRpcResponse(res, callback);
|
sendJsonRpcResponse(res, callback);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue