Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
dCache
cta
Commits
e1fb5047
Commit
e1fb5047
authored
Sep 24, 2019
by
Steven Murray
Browse files
Fixed 'invalid read' memory bug in rdbms/wrapper/MysqlStmt.cpp
parent
017f1b30
Changes
1
Hide whitespace changes
Inline
Side-by-side
rdbms/wrapper/MysqlStmt.cpp
View file @
e1fb5047
...
...
@@ -316,7 +316,7 @@ void MysqlStmt::bindOptionalString(const std::string ¶mName, const optional<
// reset memory
holder
->
reset
();
// need to use memcpy for VARBINARY strings, which are not null-terminated
memcpy
(
holder
->
val
,
paramValue
.
value
().
c_str
(),
holder
->
get_buffer_length
());
memcpy
(
holder
->
val
,
paramValue
.
value
().
c_str
(),
paramValue
.
value
().
size
());
}
else
{
holder
->
length
=
0
;
}
...
...
Write
Preview
Supports
Markdown
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