From 994b37007095d952447fd9360f7c9fcf86dfc73c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fin=20Maa=C3=9F?= Date: Tue, 6 May 2025 14:07:36 +0200 Subject: [PATCH] mgmt: hawkbit: Fix cancelAction string handling MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fix off-by-one error in cancelAction string handling. Signed-off-by: Fin Maaß (cherry picked from commit c4ff1dbc25c032b4646a4a021036a1ea444a61f6) --- subsys/mgmt/hawkbit/hawkbit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/subsys/mgmt/hawkbit/hawkbit.c b/subsys/mgmt/hawkbit/hawkbit.c index 28666b033d1e9..d0489a7397a46 100644 --- a/subsys/mgmt/hawkbit/hawkbit.c +++ b/subsys/mgmt/hawkbit/hawkbit.c @@ -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) {