mirror of https://github.com/v2ray/v2ray-core
more fuzz test
parent
42b4764700
commit
73c17d9931
|
@ -80,7 +80,7 @@ func (this *SwitchAccount) Unmarshal(data []byte) error {
|
|||
}
|
||||
this.AlterIds = serial.ParseUint16(data[alterIdStart : alterIdStart+2])
|
||||
levelStart := alterIdStart + 2
|
||||
if len(data) < levelStart {
|
||||
if len(data) < levelStart+1 {
|
||||
return transport.CorruptedPacket
|
||||
}
|
||||
this.Level = vmess.UserLevel(data[levelStart])
|
||||
|
|
|
@ -1,6 +1,10 @@
|
|||
// +build gofuzz
|
||||
|
||||
package command
|
||||
package fuzzing
|
||||
|
||||
import (
|
||||
. "github.com/v2ray/v2ray-core/proxy/vmess/command"
|
||||
)
|
||||
|
||||
func Fuzz(data []byte) int {
|
||||
cmd := new(SwitchAccount)
|
Binary file not shown.
Loading…
Reference in New Issue