mirror of
https://dev.iopsys.eu/bbf/icwmp.git
synced 2025-12-10 07:44:41 +01:00
Fix crash on no parameter_key
Default parameter_key to a 0 length string, instead of NULL. Otherwise, the code in cwmp_ubus_call and blobmsg_add_string will attempt a strlen on a NULL string, which segfaults.
This commit is contained in:
parent
e4b3f6d71f
commit
8f7af4bd2d
1 changed files with 1 additions and 1 deletions
2
xml.c
2
xml.c
|
|
@ -1545,7 +1545,7 @@ int cwmp_handle_rpc_cpe_set_parameter_values(struct session *session, struct rpc
|
|||
goto fault;
|
||||
transaction_started = true;
|
||||
}
|
||||
fault_code = cwmp_set_multiple_parameters_values(&list_set_param_value, parameter_key, &flag, rpc->list_set_value_fault);
|
||||
fault_code = cwmp_set_multiple_parameters_values(&list_set_param_value, parameter_key ? parameter_key : "", &flag, rpc->list_set_value_fault);
|
||||
if (fault_code != FAULT_CPE_NO_FAULT)
|
||||
goto fault;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue