Skip to content

Commit

Permalink
packet: remove length check (#1481)
Browse files Browse the repository at this point in the history
Fix #1478
  • Loading branch information
ShenFeng312 committed Sep 20, 2023
1 parent 43e9bef commit 78e0387
Showing 1 changed file with 3 additions and 6 deletions.
9 changes: 3 additions & 6 deletions packets.go
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
}

return 0, ErrMalformPkt
num, _, _ := readLengthEncodedInteger(data)
// ignore remaining data in the packet. see #1478.
return int(num), nil
}
return 0, err
}
Expand Down

0 comments on commit 78e0387

Please sign in to comment.