List:Commits« Previous MessageNext Message »
From:Chuck Bell Date:March 6 2009 9:23pm
Subject:bzr commit into mysql-6.0-backup branch (charles.bell:2787) Bug#43303
View as plain text  
#At file:///C:/source/bzr/mysql-6.0-bug-43303/ based on revid:ingo.struewing@stripped

 2787 Chuck Bell	2009-03-06
      BUG#43303 : Conditional jump valgrind warning for backup_backupdir
      
      This warning was being issued because the end of the string 
      for Ptr[] was not being marked. The safe call ensures this
      happens and therefore avoids the valgrind warning.
      modified:
        sql/set_var.cc

per-file messages:
  sql/set_var.cc
    Use safer c_ptr() methods.
=== modified file 'sql/set_var.cc'
--- a/sql/set_var.cc	2009-02-26 22:19:09 +0000
+++ b/sql/set_var.cc	2009-03-06 21:23:30 +0000
@@ -2950,7 +2950,7 @@ static int sys_check_backupdir(THD *thd,
   if (!(res= var->value->val_str(&str)))
     goto err;
 
-  log_file_str= res->c_ptr();
+  log_file_str= res->c_ptr_safe();
   bzero(&f_stat, sizeof(MY_STAT));
 
   /* Get dirname of the file path. */
@@ -3003,7 +3003,7 @@ static bool sys_update_backupdir(THD *th
 
     if (!(strres= var->value->val_str(&str)))
       goto err;
-    copied_value= strres->c_ptr();
+    copied_value= strres->c_ptr_safe();
     str_length= strres->length();
   }
   else

Thread
bzr commit into mysql-6.0-backup branch (charles.bell:2787) Bug#43303Chuck Bell6 Mar
  • Re: bzr commit into mysql-6.0-backup branch (charles.bell:2787)Bug#43303Jørgen Løland9 Mar