[Commits] Rev 3371: MDEV-221 : Fix potential memory access past the end of input string in filename_to_tablename() in file:///H:/bzr/5.5/

Vladislav Vaintroub wlad at montyprogram.com
Sun Apr 15 02:19:58 EEST 2012


At file:///H:/bzr/5.5/

------------------------------------------------------------
revno: 3371
revision-id: wlad at montyprogram.com-20120414231939-tmsm8o5ji06bxbwo
parent: wlad at montyprogram.com-20120413174422-596v99i0oliol1xf
committer: Vladislav Vaintroub <wlad at montyprogram.com>
branch nick: 5.5
timestamp: Sun 2012-04-15 01:19:39 +0200
message:
  MDEV-221 : Fix potential memory access  past the end of input string in filename_to_tablename()
-------------- next part --------------
=== modified file 'sql/sql_table.cc'
--- a/sql/sql_table.cc	2012-04-07 13:58:46 +0000
+++ b/sql/sql_table.cc	2012-04-14 23:19:39 +0000
@@ -379,7 +379,7 @@
   DBUG_ENTER("filename_to_tablename");
   DBUG_PRINT("enter", ("from '%s'", from));
 
-  if (!memcmp(from, tmp_file_prefix, tmp_file_prefix_length))
+  if (!strncmp(from, tmp_file_prefix, tmp_file_prefix_length))
   {
     /* Temporary table name. */
     res= (strnmov(to, from, to_length) - to);



More information about the commits mailing list