List:Commits« Previous MessageNext Message »
From:msvensson Date:August 23 2007 6:24pm
Subject:bk commit into 5.0 tree (msvensson:1.2517) BUG#30593
View as plain text  
Below is the list of changes that have just been committed into a local
5.0 repository of msvensson. When msvensson does a push these changes will
be propagated to the main repository and, within 24 hours after the
push, to the public repository.
For information on how to access the public repository
see http://dev.mysql.com/doc/mysql/en/installing-source-tree.html

ChangeSet@stripped, 2007-08-23 20:24:48+02:00, msvensson@pilot.(none) +1 -0
  Bug#30593 No cipher list returned for "SHOW STATUS LIKE 'Ssl_cipher_list'"
   - Move increment of "i" to "increment section" of for loop
   - Protect against writing after end of "buff"(backport from 5.1)

  sql/sql_show.cc@stripped, 2007-08-23 20:24:47+02:00, msvensson@pilot.(none) +3 -2
    - Move the increment of i to "increment" section of for loop. Since "i"
    was initially 0 the for loop exited immediately
    - Add protection for writing after end of "buff"

diff -Nrup a/sql/sql_show.cc b/sql/sql_show.cc
--- a/sql/sql_show.cc	2007-07-28 14:01:43 +02:00
+++ b/sql/sql_show.cc	2007-08-23 20:24:47 +02:00
@@ -1739,12 +1739,13 @@ static bool show_status_array(THD *thd, 
           if (thd->net.vio->ssl_arg)
           {
             char *to= buff;
-            for (int i=0 ; i++ ;)
+            char *buff_end= buff + sizeof(buff);
+            for (int i= 0; to < buff_end; i++)
             {
               const char *p= SSL_get_cipher_list((SSL*) thd->net.vio->ssl_arg,i);
               if (p == NULL)
                 break;
-              to= strmov(to, p);
+              to= strnmov(to, p, buff_end-to-1);
               *to++= ':';
             }
             if (to != buff)
Thread
bk commit into 5.0 tree (msvensson:1.2517) BUG#30593msvensson23 Aug