mirror of
https://github.com/xiaozhou233/JuiceAgent.git
synced 2026-12-05 21:15:56 +08:00
Fix: harden remapper filters and agent init guard
- skip empty include/exclude entries in Remapper::shouldRemap to avoid calling back() on an empty std::string (undefined behavior) - null-check new_class_data_len/new_classbytes in JuiceRemapperService before writing remapped bytes back to the JVMTI callback - add Agent::initialized_ guard so init() is a no-op on second call, preventing duplicate service instantiation and listeners
This commit is contained in:
1 parent
18a923373b
commit
ff216aabee
4 files changed
+10
-1
No files matched your search
@@ -69,6 +69,11 @@ namespace JuiceAgent {
|
||||
spdlog::error("[JuiceAgent] Agent not loaded! Please call preload() first!");
|
||||
return false;
|
||||
}
|
||||
if(initialized_) {
|
||||
spdlog::warn("[JuiceAgent] Agent already initialized! Skipping...");
|
||||
return true;
|
||||
}
|
||||
initialized_ = true;
|
||||
|
||||
// Add Abilities
|
||||
jvmtiCapabilities caps{};
|
||||
|
||||
Reference in new issue
Block a user