summaryrefslogtreecommitdiff
path: root/mysys_ssl
diff options
context:
space:
mode:
authorNirbhay Choubey <nirbhay@mariadb.com>2014-12-31 19:52:35 -0500
committerNirbhay Choubey <nirbhay@mariadb.com>2014-12-31 19:52:35 -0500
commit61f73d40cab40994a1baaacc87c9e81d8e335975 (patch)
tree8ff2b8bd735e735c93071c7dc02d4201a9c75e71 /mysys_ssl
parentdc92032fa33cc1f3bc7fb0f885433826246bcdc0 (diff)
downloadmariadb-git-61f73d40cab40994a1baaacc87c9e81d8e335975.tar.gz
MDEV-7397: SIGSEGV on inserting into a key-less table
When wsrep is enabled, an md5 hash of the entire row is calculated for tables with no PK. It, however segfaulted as the md5 context object was not properly constructed. Fixed by ensuring that the YaSSL's context object gets constructed explicitly at the specified pre-allocated location (placement) before its used. Added a test case.
Diffstat (limited to 'mysys_ssl')
-rw-r--r--mysys_ssl/my_md5.cc1
1 files changed, 1 insertions, 0 deletions
diff --git a/mysys_ssl/my_md5.cc b/mysys_ssl/my_md5.cc
index 697655244eb..875891abf57 100644
--- a/mysys_ssl/my_md5.cc
+++ b/mysys_ssl/my_md5.cc
@@ -34,6 +34,7 @@ typedef TaoCrypt::MD5 MD5_CTX;
static void md5_init(MD5_CTX *context)
{
+ context= new(context) MD5_CTX;
context->Init();
}