stratum: check if blocknotify string param is set

This commit is contained in:
Tanguy Pruvot 2018-06-01 18:11:28 +02:00
parent b0a0e53293
commit ba20dc3ffa

View file

@ -291,7 +291,7 @@ bool client_authorize(YAAMP_CLIENT *client, json_value *json_params)
bool client_update_block(YAAMP_CLIENT *client, json_value *json_params) bool client_update_block(YAAMP_CLIENT *client, json_value *json_params)
{ {
// password, id, block hash // password, id, block hash
if(json_params->u.array.length < 3) if(json_params->u.array.length < 3 || !json_params->u.array.values[0]->u.string.ptr)
{ {
clientlog(client, "update block, bad params"); clientlog(client, "update block, bad params");
return false; return false;