Skip to content

Commit 69e3ed7

Browse files
committed
Merge pull request go-sql-driver#378 from Carrotman42/master
Actually zero out the bytes in the HandshakeResponse320
2 parents 527bcd5 + fd85cc8 commit 69e3ed7

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

packets.go

+4-1
Original file line numberDiff line numberDiff line change
@@ -282,7 +282,10 @@ func (mc *mysqlConn) writeAuthPacket(cipher []byte) error {
282282
}
283283

284284
// Filler [23 bytes] (all 0x00)
285-
pos := 13 + 23
285+
pos := 13
286+
for ; pos < 13+23; pos++ {
287+
data[pos] = 0
288+
}
286289

287290
// User [null terminated string]
288291
if len(mc.cfg.user) > 0 {

0 commit comments

Comments
 (0)