mirror of
https://github.com/v2fly/v2ray-core.git
synced 2024-11-04 09:17:32 -05:00
more fuzz test
This commit is contained in:
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)
|
BIN
proxy/vmess/command/testing/fuzzing/data/empty_host.corpus
Normal file
BIN
proxy/vmess/command/testing/fuzzing/data/empty_host.corpus
Normal file
Binary file not shown.
Loading…
Reference in New Issue
Block a user