From 38ddd11c8e4643972ec9f9d995ab019bc6fa7f75 Mon Sep 17 00:00:00 2001 From: onefang Date: Thu, 23 Apr 2020 01:32:21 +1000 Subject: Ignore the previous commit, this should fix the actual bug. My fault. lol --- src/sledjchisl/sledjchisl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sledjchisl/sledjchisl.c b/src/sledjchisl/sledjchisl.c index ab5c707..727d70d 100644 --- a/src/sledjchisl/sledjchisl.c +++ b/src/sledjchisl/sledjchisl.c @@ -1126,7 +1126,7 @@ W("Allocated %d %d inBinds for %s", i, req->inCount, req->sql); // https://blog.cotten.io/a-taste-of-mysql-in-c-87c5de84a31d?gi=ab3dd1425b29 // For some gotchas about all of this binding bit. req->inBind[i].buffer_type = fld->type; - req->inBind[i].buffer = xzalloc(fld->length) + 4; // Note the + 1 is for string types, and a waste for the rest. +4 to work around a MariaDB bug? + req->inBind[i].buffer = xzalloc(fld->length + 1); // Note the + 1 is for string types, and a waste for the rest. req->inBind[i].buffer_length = fld->length; switch(fld->type) { -- cgit v1.1