1
mirror of https://github.com/rapid7/metasploit-framework synced 2024-10-29 18:07:27 +01:00

Backport an upstream fix for a nil header

353d5951da
7c984ea66e
This commit is contained in:
William Vu 2015-06-05 11:45:53 -05:00
parent e151e38181
commit 15916f0ab0

View File

@ -234,6 +234,7 @@ class RbMysql
begin
Timeout.timeout @read_timeout do
header = @sock.read(4)
raise EOFError unless header && header.length == 4
len1, len2, seq = header.unpack("CvC")
len = (len2 << 8) + len1
# Ignore the sequence number -- protocol differences between 4.x and 5.x