mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Bug#32707: misdimensioned buffer in protocol layer
Miscalculation in protocol-layer: size buffer correctly so even really long error messages cannot overflow our buffer.
This commit is contained in:
parent
c6f65c8b48
commit
46ee271e8f
@@ -56,7 +56,10 @@ void send_error(THD *thd, uint sql_errno, const char *err)
|
||||
{
|
||||
#ifndef EMBEDDED_LIBRARY
|
||||
uint length;
|
||||
char buff[MYSQL_ERRMSG_SIZE+2], *pos;
|
||||
/*
|
||||
buff[]: sql_errno:2 + ('#':1 + SQLSTATE_LENGTH:5) + MYSQL_ERRMSG_SIZE:512
|
||||
*/
|
||||
char buff[2+1+SQLSTATE_LENGTH+MYSQL_ERRMSG_SIZE], *pos;
|
||||
#endif
|
||||
const char *orig_err= err;
|
||||
NET *net= &thd->net;
|
||||
|
||||
Reference in New Issue
Block a user