Loading mysys/mf_dirname.c +3 −1 Original line number Diff line number Diff line Loading @@ -72,7 +72,9 @@ uint dirname_part(my_string to, const char *name) SYNPOSIS convert_dirname() to Store result here to Store result here. Must be at least of size min(FN_REFLEN, strlen(from) + 1) to make room for adding FN_LIBCHAR at the end. from Original filename. May be == to from_end Pointer at end of filename (normally end \0) Loading server-tools/instance-manager/instance_options.cc +7 −2 Original line number Diff line number Diff line Loading @@ -420,8 +420,13 @@ int Instance_options::complete_initialization(const char *default_path) const char *tmp; char *end; if (!mysqld_path.str && !(mysqld_path.str= strdup_root(&alloc, default_path))) if (!mysqld_path.str) { // Need one extra byte, as convert_dirname() adds a slash at the end. if (!(mysqld_path.str= alloc_root(&alloc, strlen(default_path) + 2))) goto err; strcpy(mysqld_path.str, default_path); } // it's safe to cast this to char* since this is a buffer we are allocating end= convert_dirname((char*)mysqld_path.str, mysqld_path.str, NullS); Loading Loading
mysys/mf_dirname.c +3 −1 Original line number Diff line number Diff line Loading @@ -72,7 +72,9 @@ uint dirname_part(my_string to, const char *name) SYNPOSIS convert_dirname() to Store result here to Store result here. Must be at least of size min(FN_REFLEN, strlen(from) + 1) to make room for adding FN_LIBCHAR at the end. from Original filename. May be == to from_end Pointer at end of filename (normally end \0) Loading
server-tools/instance-manager/instance_options.cc +7 −2 Original line number Diff line number Diff line Loading @@ -420,8 +420,13 @@ int Instance_options::complete_initialization(const char *default_path) const char *tmp; char *end; if (!mysqld_path.str && !(mysqld_path.str= strdup_root(&alloc, default_path))) if (!mysqld_path.str) { // Need one extra byte, as convert_dirname() adds a slash at the end. if (!(mysqld_path.str= alloc_root(&alloc, strlen(default_path) + 2))) goto err; strcpy(mysqld_path.str, default_path); } // it's safe to cast this to char* since this is a buffer we are allocating end= convert_dirname((char*)mysqld_path.str, mysqld_path.str, NullS); Loading