(t *testing.T)
| 114 | } |
| 115 | |
| 116 | func TestReadVarUint32RejectsOverflowFifthByte(t *testing.T) { |
| 117 | for _, data := range [][]byte{ |
| 118 | {0x80, 0x80, 0x80, 0x80, 0x10}, |
| 119 | {0x80, 0x80, 0x80, 0x80, 0x10, 0, 0, 0}, |
| 120 | } { |
| 121 | buf := NewByteBuffer(data) |
| 122 | var err Error |
| 123 | _ = buf.ReadVarUint32(&err) |
| 124 | require.True(t, err.HasError(), "expected overflow error for %v", data) |
| 125 | } |
| 126 | } |
| 127 | |
| 128 | func TestStreamSkipDoesNotGrowToSkippedLength(t *testing.T) { |
| 129 | err := &Error{} |
nothing calls this directly
no test coverage detected