move fuzz files, fix crasher

This commit is contained in:
Hayden
2017-04-16 21:02:47 -07:00
parent 95d65ab0a0
commit b2bae2c198
53 changed files with 80 additions and 33 deletions

View File

@ -82,3 +82,16 @@ func TestReadRouterAddressReturnsCorrectRemainderWithoutError(t *testing.T) {
assert.Nil(err, "checkValid() on address from ReadRouterAddress() reported error with valid data")
assert.Equal(exit, false, "checkValid() on address from ReadRouterAddress() indicated to stop parsing valid data")
}
func TestCorrectsFuzzCrasher1(t *testing.T) {
assert := assert.New(t)
defer func() {
if r := recover(); r != nil {
assert.Equal(nil, r)
}
}()
router_address_bytes := []byte{0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x30, 0x00, 0x30, 0x30}
ReadRouterAddress(router_address_bytes)
}