summaryrefslogtreecommitdiff
path: root/innobase/fil
diff options
context:
space:
mode:
authormarko@hundin.mysql.fi <>2004-04-01 16:51:34 +0300
committermarko@hundin.mysql.fi <>2004-04-01 16:51:34 +0300
commite00bf40360ce47ce718afe85cccfb28ac4c4e8ac (patch)
treefab5076a83cb8b112b16f76355f3a96a708c48ba /innobase/fil
parentebc7b6ba87da09082b61b57d77c17af867ef804f (diff)
downloadmariadb-git-e00bf40360ce47ce718afe85cccfb28ac4c4e8ac.tar.gz
InnoDB cleanup: fixing buffer overflows and quoting of quotes
Diffstat (limited to 'innobase/fil')
-rw-r--r--innobase/fil/fil0fil.c14
1 files changed, 2 insertions, 12 deletions
diff --git a/innobase/fil/fil0fil.c b/innobase/fil/fil0fil.c
index 9f33013d2f9..1abb1b926f2 100644
--- a/innobase/fil/fil0fil.c
+++ b/innobase/fil/fil0fil.c
@@ -288,7 +288,6 @@ fil_node_create(
{
fil_node_t* node;
fil_space_t* space;
- char* name2;
fil_system_t* system = fil_system;
ut_a(system);
@@ -299,11 +298,7 @@ fil_node_create(
node = mem_alloc(sizeof(fil_node_t));
- name2 = mem_alloc(ut_strlen(name) + 1);
-
- ut_strcpy(name2, name);
-
- node->name = name2;
+ node->name = mem_strdup(name);
node->open = FALSE;
node->size = size;
node->magic_n = FIL_NODE_MAGIC_N;
@@ -626,7 +621,6 @@ fil_space_create(
ulint purpose)/* in: FIL_TABLESPACE, or FIL_LOG if log */
{
fil_space_t* space;
- char* name2;
fil_system_t* system = fil_system;
ut_a(system);
@@ -642,11 +636,7 @@ fil_space_create(
space = mem_alloc(sizeof(fil_space_t));
- name2 = mem_alloc(ut_strlen(name) + 1);
-
- ut_strcpy(name2, name);
-
- space->name = name2;
+ space->name = mem_strdup(name);
space->id = id;
space->purpose = purpose;
space->size = 0;