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:
unknown 2006-03-21 17:02:46 +01:00
commit 0b1540ea5b

View file

@ -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)