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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
mariadb
Commits
84713274
Commit
84713274
authored
Feb 09, 2008
by
kostja@dipika.(none)
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a buffer overflow with strmake().
parent
add76ef5
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
sql/sql_class.cc
sql/sql_class.cc
+2
-2
No files found.
sql/sql_class.cc
View file @
84713274
...
@@ -406,7 +406,7 @@ Diagnostics_area::set_ok_status(THD *thd, ha_rows affected_rows_arg,
...
@@ -406,7 +406,7 @@ Diagnostics_area::set_ok_status(THD *thd, ha_rows affected_rows_arg,
m_affected_rows
=
affected_rows_arg
;
m_affected_rows
=
affected_rows_arg
;
m_last_insert_id
=
last_insert_id_arg
;
m_last_insert_id
=
last_insert_id_arg
;
if
(
message_arg
)
if
(
message_arg
)
strmake
(
m_message
,
message_arg
,
sizeof
(
m_message
));
strmake
(
m_message
,
message_arg
,
sizeof
(
m_message
)
-
1
);
else
else
m_message
[
0
]
=
'\0'
;
m_message
[
0
]
=
'\0'
;
m_status
=
DA_OK
;
m_status
=
DA_OK
;
...
@@ -456,7 +456,7 @@ Diagnostics_area::set_error_status(THD *thd, uint sql_errno_arg,
...
@@ -456,7 +456,7 @@ Diagnostics_area::set_error_status(THD *thd, uint sql_errno_arg,
DBUG_ASSERT
(
!
is_set
()
||
can_overwrite_status
);
DBUG_ASSERT
(
!
is_set
()
||
can_overwrite_status
);
m_sql_errno
=
sql_errno_arg
;
m_sql_errno
=
sql_errno_arg
;
strmake
(
m_message
,
message_arg
,
sizeof
(
m_message
));
strmake
(
m_message
,
message_arg
,
sizeof
(
m_message
)
-
1
);
m_status
=
DA_ERROR
;
m_status
=
DA_ERROR
;
}
}
...
...
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