mirror of
https://github.com/asdlokj1qpi233/subconverter.git
synced 2025-10-30 13:22:39 +00:00
Fix potential crash when parsing V2Ray configs
This commit is contained in:
@@ -144,7 +144,7 @@ void explodeVmessConf(std::string content, const std::string &custom_port, int l
|
||||
else if(nodejson["streamSettings"].HasMember("wsSettings"))
|
||||
settings = nodejson["streamSettings"]["wsSettings"];
|
||||
else
|
||||
settings.Clear();
|
||||
settings.RemoveAllMembers();
|
||||
path = GetMember(settings, "path");
|
||||
if(settings.HasMember("headers"))
|
||||
{
|
||||
@@ -157,7 +157,7 @@ void explodeVmessConf(std::string content, const std::string &custom_port, int l
|
||||
else if(nodejson["streamSettings"].HasMember("tcpsettings"))
|
||||
settings = nodejson["streamSettings"]["tcpsettings"];
|
||||
else
|
||||
settings.Clear();
|
||||
settings.RemoveAllMembers();
|
||||
if(settings.HasMember("header"))
|
||||
{
|
||||
type = GetMember(settings["header"], "type");
|
||||
|
||||
Reference in New Issue
Block a user