mirror of
https://github.com/XTLS/Xray-core.git
synced 2026-05-14 18:09:05 +00:00
Fix DoS attack vulnerability in CommandSwitchAccountFactory
This commit is contained in:
@@ -139,7 +139,7 @@ func (f *CommandSwitchAccountFactory) Unmarshal(data []byte) (interface{}, error
|
||||
}
|
||||
cmd.Level = uint32(data[levelStart])
|
||||
timeStart := levelStart + 1
|
||||
if len(data) < timeStart {
|
||||
if len(data) < timeStart+1 {
|
||||
return nil, newError("insufficient length.")
|
||||
}
|
||||
cmd.ValidMin = data[timeStart]
|
||||
|
||||
Reference in New Issue
Block a user