summaryrefslogtreecommitdiff
path: root/storage/connect/value.cpp
diff options
context:
space:
mode:
authorOlivier Bertrand <bertrandop@gmail.com>2015-01-24 11:46:18 +0100
committerOlivier Bertrand <bertrandop@gmail.com>2015-01-24 11:46:18 +0100
commitdbf690b5d170d16c052edc621819769ec0da4373 (patch)
treed4f608138d5e264dfc460ffcb3039a04f7fb176d /storage/connect/value.cpp
parent2cd36ad7d0b538d632f774937cdb8269772ef0d7 (diff)
downloadmariadb-git-dbf690b5d170d16c052edc621819769ec0da4373.tar.gz
- Fix correctly MDEV-7498. The problem was not in AllocateValue but in
the constructor of TYPVAL<PSZ> The new strg was widely uninitialised just by setting a terminated null char. Now the whole string is zero'ed. In Tabjson JSONCOL::ParseJpath, the original code was restored. modified: storage/connect/tabjson.cpp storage/connect/value.cpp
Diffstat (limited to 'storage/connect/value.cpp')
-rw-r--r--storage/connect/value.cpp2
1 files changed, 1 insertions, 1 deletions
diff --git a/storage/connect/value.cpp b/storage/connect/value.cpp
index 32a4959df06..2792cbf3929 100644
--- a/storage/connect/value.cpp
+++ b/storage/connect/value.cpp
@@ -1224,7 +1224,7 @@ TYPVAL<PSZ>::TYPVAL(PGLOBAL g, PSZ s, int n, int c)
if (!s) {
if (g) {
if ((Strp = (char *)PlgDBSubAlloc(g, NULL, Len + 1)))
- Strp[Len] = '\0';
+ memset(Strp, 0, Len + 1);
else
Len = 0;