diff --git a/CHANGELOG.MD b/CHANGELOG.MD index 4ff4429..940d02d 100644 --- a/CHANGELOG.MD +++ b/CHANGELOG.MD @@ -9,6 +9,7 @@ - [功能] 字符串替换时处理反射字符串类名 - [功能] 添加对泛型 `signature` 的处理 - [优化] 优化 `builtin` 黑名单解析和注释 +- [BUG] 修复 `NATIVE` 的 `malloc` 错误 - [BUG] 修复没有添加目录到 `JAR ENTRY` 的问题 - [BUG] 花指令混淆部分遇到类加载报错解决 - [BUG] 修复 `MANIFEST.MF` 没有完全修改的问题 diff --git a/native/start_windows.c b/native/start_windows.c index 5050a7e..1df5f8a 100644 --- a/native/start_windows.c +++ b/native/start_windows.c @@ -187,11 +187,11 @@ JNIEXPORT jint JNICALL Agent_OnLoad(JavaVM *vm, char *options, void *reserved) { } // SET PACKAGE_NAME - PACKAGE_NAME = (char *) malloc(strlen((char *) v1)); + PACKAGE_NAME = (char *) malloc(strlen((char *) v1) + 1); strcpy(PACKAGE_NAME, (char *) v1); // SET KEY - KEY = (unsigned char *) malloc(16); + KEY = (unsigned char *) malloc(strlen((char *) v2) + 1); strcpy((char *) KEY, (char *) v2); jvmtiEnv *jvmti; diff --git a/src/main/resources/libdecrypter.dll b/src/main/resources/libdecrypter.dll index dc22237..c01ee83 100644 Binary files a/src/main/resources/libdecrypter.dll and b/src/main/resources/libdecrypter.dll differ diff --git a/src/main/resources/libencryptor.dll b/src/main/resources/libencryptor.dll index 0f325ba..d0b5a96 100644 Binary files a/src/main/resources/libencryptor.dll and b/src/main/resources/libencryptor.dll differ