Skip to content

Commit

Permalink
frame: report unknown error codes as a frame parse error
Browse files Browse the repository at this point in the history
  • Loading branch information
Zariel committed May 1, 2016
1 parent 3ac2b43 commit 32c50a2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion frame.go
Original file line number Diff line number Diff line change
Expand Up @@ -574,7 +574,7 @@ func (f *framer) parseErrorFrame() frame {
res.ArgTypes = f.readStringList()
return res
default:
return &errD
panic(fmt.Errorf("unknown error code: 0x%x", errD.code))
}
}

Expand Down
4 changes: 2 additions & 2 deletions frame_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ func TestFuzzBugs(t *testing.T) {
"0000000"),
[]byte("\x82\xe600\x00\x00\x00\x000"),
[]byte("\x8200\b\x00\x00\x00\b0\x00\x00\x00\x040000"),
//[]byte("\x8200\x00\x00\x00\x00\x100\x00\x00\x12\x00\x00\x0000000" +
// "00000"), // SKIP this for now, this was caused by an unrelated bug
[]byte("\x8200\x00\x00\x00\x00\x100\x00\x00\x12\x00\x00\x0000000" +
"00000"),
[]byte("\x83000\b\x00\x00\x00\x14\x00\x00\x00\x020000000" +
"000000000"),
[]byte("\x83000\b\x00\x00\x000\x00\x00\x00\x04\x00\x1000000" +
Expand Down

0 comments on commit 32c50a2

Please sign in to comment.