1
0
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:
v2ray 2016-01-22 21:56:37 +01:00
parent 42b4764700
commit 73c17d9931
3 changed files with 6 additions and 2 deletions

View File

@ -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])

View File

@ -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)