We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5483158 commit 332853aCopy full SHA for 332853a
frame.go
@@ -328,6 +328,10 @@ func (f *framer) trace() {
328
329
// reads a frame form the wire into the framers buffer
330
func (f *framer) readFrame(head *frameHeader) error {
331
+ if head.length < 0 {
332
+ return fmt.Errorf("frame body length can not be less than 0: %d", head.length)
333
+ }
334
+
335
if cap(f.readBuffer) >= head.length {
336
f.rbuf = f.readBuffer[:head.length]
337
} else {
0 commit comments