Function flt_ot_var_set() did not check whether the variable was
successfully set or not. In case of failure, the value -1 is returned.
This patch must be backported as far as 2.4.
smp.data.u.str.area = (char *)value;
smp.data.u.str.data = strlen(value);
- vars_set_by_name_ifexist(var_name, retval, &smp);
+ if (vars_set_by_name_ifexist(var_name, retval, &smp) == 0) {
+ FLT_OT_ERR("failed to set variable '%s'", var_name);
+
+ retval = -1;
+ } else {
+ FLT_OT_DBG(2, "variable '%s' set", var_name);
+ }
FLT_OT_RETURN(retval);
}