Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
M
MariaDB
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
nexedi
MariaDB
Commits
8b79b8fd
Commit
8b79b8fd
authored
Dec 18, 2009
by
Davi Arnaut
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Bug#48983: Bad strmake calls (length one too long)
MySQL 5.1 specific fixes.
parent
95e34182
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
6 additions
and
6 deletions
+6
-6
server-tools/instance-manager/instance_map.cc
server-tools/instance-manager/instance_map.cc
+2
-2
server-tools/instance-manager/options.cc
server-tools/instance-manager/options.cc
+2
-2
server-tools/instance-manager/user_map.cc
server-tools/instance-manager/user_map.cc
+1
-1
sql/sql_plugin.cc
sql/sql_plugin.cc
+1
-1
No files found.
server-tools/instance-manager/instance_map.cc
View file @
8b79b8fd
...
@@ -117,13 +117,13 @@ static void parse_option(const char *option_str,
...
@@ -117,13 +117,13 @@ static void parse_option(const char *option_str,
while
(
*
ptr
==
'-'
)
while
(
*
ptr
==
'-'
)
++
ptr
;
++
ptr
;
strmake
(
option_name_buf
,
ptr
,
MAX_OPTION_LEN
+
1
);
strmake
(
option_name_buf
,
ptr
,
MAX_OPTION_LEN
);
eq_pos
=
strchr
(
ptr
,
'='
);
eq_pos
=
strchr
(
ptr
,
'='
);
if
(
eq_pos
)
if
(
eq_pos
)
{
{
option_name_buf
[
eq_pos
-
ptr
]
=
0
;
option_name_buf
[
eq_pos
-
ptr
]
=
0
;
strmake
(
option_value_buf
,
eq_pos
+
1
,
MAX_OPTION_LEN
+
1
);
strmake
(
option_value_buf
,
eq_pos
+
1
,
MAX_OPTION_LEN
);
}
}
else
else
{
{
...
...
server-tools/instance-manager/options.cc
View file @
8b79b8fd
...
@@ -533,10 +533,10 @@ static int setup_windows_defaults()
...
@@ -533,10 +533,10 @@ static int setup_windows_defaults()
return
1
;
return
1
;
}
}
strmake
(
base_name
,
base_name_ptr
,
FN_REFLEN
);
strmake
(
base_name
,
base_name_ptr
,
FN_REFLEN
-
1
);
*
base_name_ptr
=
0
;
*
base_name_ptr
=
0
;
strmake
(
im_name
,
base_name
,
FN_REFLEN
);
strmake
(
im_name
,
base_name
,
FN_REFLEN
-
1
);
ptr
=
strrchr
(
im_name
,
'.'
);
ptr
=
strrchr
(
im_name
,
'.'
);
if
(
!
ptr
)
if
(
!
ptr
)
...
...
server-tools/instance-manager/user_map.cc
View file @
8b79b8fd
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
User
::
User
(
const
LEX_STRING
*
user_name_arg
,
const
char
*
password
)
User
::
User
(
const
LEX_STRING
*
user_name_arg
,
const
char
*
password
)
{
{
user_length
=
(
uint8
)
(
strmake
(
user
,
user_name_arg
->
str
,
user_length
=
(
uint8
)
(
strmake
(
user
,
user_name_arg
->
str
,
USERNAME_LENGTH
+
1
)
-
user
);
USERNAME_LENGTH
)
-
user
);
set_password
(
password
);
set_password
(
password
);
}
}
...
...
sql/sql_plugin.cc
View file @
8b79b8fd
...
@@ -2084,7 +2084,7 @@ static int check_func_set(THD *thd, struct st_mysql_sys_var *var,
...
@@ -2084,7 +2084,7 @@ static int check_func_set(THD *thd, struct st_mysql_sys_var *var,
&
error
,
&
error_len
,
&
not_used
);
&
error
,
&
error_len
,
&
not_used
);
if
(
error_len
)
if
(
error_len
)
{
{
strmake
(
buff
,
error
,
min
(
sizeof
(
buff
),
error_len
));
strmake
(
buff
,
error
,
min
(
sizeof
(
buff
)
-
1
,
error_len
));
strvalue
=
buff
;
strvalue
=
buff
;
goto
err
;
goto
err
;
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment