Skip to content

Commit 78e0387

Browse files
authored
packet: remove length check (#1481)
Fix #1478
1 parent 43e9bef commit 78e0387

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

packets.go

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -572,12 +572,9 @@ func (mc *okHandler) readResultSetHeaderPacket() (int, error) {
572572
}
573573

574574
// column count
575-
num, _, n := readLengthEncodedInteger(data)
576-
if n-len(data) == 0 {
577-
return int(num), nil
578-
}
579-
580-
return 0, ErrMalformPkt
575+
num, _, _ := readLengthEncodedInteger(data)
576+
// ignore remaining data in the packet. see #1478.
577+
return int(num), nil
581578
}
582579
return 0, err
583580
}

0 commit comments

Comments
 (0)