From 5b19bd080f47a9940f679e6050b7277688073f14 Mon Sep 17 00:00:00 2001 From: kun chen Date: Mon, 1 Sep 2025 15:57:46 +0800 Subject: [PATCH] std::stol crash with invalid argument Signed-off-by: kun chen --- src/daemon/daemon_forward.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/daemon/daemon_forward.cpp b/src/daemon/daemon_forward.cpp index 870326bc..b2782b2e 100644 --- a/src/daemon/daemon_forward.cpp +++ b/src/daemon/daemon_forward.cpp @@ -44,7 +44,7 @@ bool HdcDaemonForward::SetupJdwpPoint(HCtxForward ctxPoint) { HdcDaemon *daemon = (HdcDaemon *)taskInfo->ownerSessionClass; HdcJdwp *clsJdwp = (HdcJdwp *)daemon->clsJdwp; - uint32_t pid = std::stol(ctxPoint->localArgs[1]); + uint32_t pid = static_cast(atoi(ctxPoint->localArgs[1].c_str())); if (ctxPoint->checkPoint) { uint32_t id = ctxPoint->id; bool ret = clsJdwp->CheckPIDExist(pid); -- Gitee