From c2153fd02498da36f8f00b9ea84fb1b160276964 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=BB=84=E6=98=95?= Date: Thu, 24 Aug 2023 09:24:14 +0800 Subject: [PATCH] =?UTF-8?q?OCT=201.=20=E4=BF=AE=E5=A4=8D=E7=AE=A1=E7=90=86?= =?UTF-8?q?=E5=B9=B3=E5=8F=B0=E8=BF=94=E5=9B=9E=E6=8E=A5=E5=8F=A3=E9=94=99?= =?UTF-8?q?=E8=AF=AF=E7=A0=81=E5=88=A4=E6=96=AD=E4=B8=8D=E5=87=86=E7=A1=AE?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- NetTunnelSDK/UserManager.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/NetTunnelSDK/UserManager.cpp b/NetTunnelSDK/UserManager.cpp index f66e933..410b1f7 100644 --- a/NetTunnelSDK/UserManager.cpp +++ b/NetTunnelSDK/UserManager.cpp @@ -474,6 +474,7 @@ int GetUserClientConfigure(const TCHAR *pUserName, const TCHAR *pToken, PUSER_CL PUSER_CLIENT_CONFIG pUserCfg = &pUser->cliConfig; TCHAR userPath[MAX_PATH]; int ret; + TCHAR *pConvRet; #if USER_REAL_PLATFORM ProtocolRequest req; @@ -565,9 +566,9 @@ int GetUserClientConfigure(const TCHAR *pUserName, const TCHAR *pToken, PUSER_CL return ret; } - ret = strtol(rsp.code.c_str(), nullptr, 10); + ret = strtol(rsp.code.c_str(), &pConvRet, 10); - if (ret != 0) { + if (ret != 0 || lstrlen(pConvRet) > 0) { SPDLOG_ERROR(TEXT("Server response error code: {0}"), ret); return -ERR_HTTP_SERVER_RSP; }