Skip to content

Commit

Permalink
remove length check
Browse files Browse the repository at this point in the history
  • Loading branch information
ShenFeng312 committed Sep 20, 2023
1 parent 43e9bef commit cd44929
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions packets.go
Original file line number Diff line number Diff line change
Expand Up @@ -572,12 +572,9 @@ func (mc *okHandler) readResultSetHeaderPacket() (int, error) {
}

// column count
num, _, n := readLengthEncodedInteger(data)
if n-len(data) == 0 {
return int(num), nil
}
num, _, _ := readLengthEncodedInteger(data)
return int(num), nil

return 0, ErrMalformPkt
}
return 0, err
}
Expand Down

0 comments on commit cd44929

Please sign in to comment.