mgmt: hawkbit: Fix cancelAction string handling

Fix off-by-one error in cancelAction string handling.

Signed-off-by: Fin Maaß <f.maass@vogl-electronic.com>
This commit is contained in:
Fin Maaß 2025-05-06 14:07:36 +02:00 committed by Benjamin Cabé
commit c4ff1dbc25

View file

@ -638,7 +638,7 @@ static int hawkbit_find_cancel_action_id(struct hawkbit_ctl_res *res,
return -EINVAL;
}
helper += sizeof("cancelAction/");
helper += sizeof("cancelAction/") - 1;
*cancel_action_id = strtol(helper, NULL, 10);
if (*cancel_action_id <= 0) {