Commit e1fb5047 authored by Steven Murray's avatar Steven Murray
Browse files

Fixed 'invalid read' memory bug in rdbms/wrapper/MysqlStmt.cpp

parent 017f1b30
......@@ -316,7 +316,7 @@ void MysqlStmt::bindOptionalString(const std::string &paramName, 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;
}
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment