server: check an array out of range for malform packet (#2048)

This commit is contained in:
tiancaiamao
2016-11-21 23:10:28 +08:00
committed by GitHub
parent af5b0e71fc
commit 6b444f8e55

View File

@ -185,6 +185,10 @@ func parseStmtArgs(args []interface{}, boundParams [][]byte, nullBitmap, paramTy
continue
}
if (i<<1)+1 >= len(paramTypes) {
return mysql.ErrMalformPacket
}
tp := paramTypes[i<<1]
isUnsigned := (paramTypes[(i<<1)+1] & 0x80) > 0