소스 검색

Merge pull request #378 from Carrotman42/master

Actually zero out the bytes in the HandshakeResponse320
Julien Schmidt 10 년 전
부모
커밋
69e3ed7607
1개의 변경된 파일4개의 추가작업 그리고 1개의 파일을 삭제
  1. 4 1
      packets.go

+ 4 - 1
packets.go

@@ -282,7 +282,10 @@ func (mc *mysqlConn) writeAuthPacket(cipher []byte) error {
 	}
 
 	// Filler [23 bytes] (all 0x00)
-	pos := 13 + 23
+	pos := 13
+	for ; pos < 13+23; pos++ {
+		data[pos] = 0
+	}
 
 	// User [null terminated string]
 	if len(mc.cfg.user) > 0 {