mirror of
https://github.com/MariaDB/server.git
synced 2026-04-30 12:15:32 +02:00
Bug#18310 Server compiled with yassl crash
- Add protection so that 'show_ssl_get_cipher_list' does not write after end of "buff" sql/mysqld.cc: Add check to not write after the end of "buff" when listing the available ciphers
This commit is contained in:
parent
8505322d1b
commit
0b1540ea5b
1 changed files with 4 additions and 2 deletions
|
|
@ -6600,9 +6600,11 @@ static int show_ssl_get_cipher_list(THD *thd, SHOW_VAR *var, char *buff)
|
|||
{
|
||||
int i;
|
||||
const char *p;
|
||||
for (i=0 ; (p= SSL_get_cipher_list((SSL*) thd->net.vio->ssl_arg,i)); i++)
|
||||
char *end= buff + SHOW_VAR_FUNC_BUFF_SIZE;
|
||||
for (i=0; (p= SSL_get_cipher_list((SSL*) thd->net.vio->ssl_arg,i)) &&
|
||||
buff < end; i++)
|
||||
{
|
||||
buff= strmov(buff, p);
|
||||
buff= strnmov(buff, p, end-buff-1);
|
||||
*buff++= ':';
|
||||
}
|
||||
if (i)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue