Commit 898e363c authored by unknown's avatar unknown

Fixed memory allocation: allocated memory wasn't enough to store the

final 0 of the string.


mysys/default.c:
  Wrong memory allocation fixed.
parent c3a3d608
......@@ -258,7 +258,7 @@ static int handle_default_option(void *in_ctx, const char *group_name,
ctx= (struct handle_option_ctx *) in_ctx;
if(find_type((char *)group_name, ctx->group, 3))
{
if (!(tmp= alloc_root(ctx->alloc, (uint) strlen(option))))
if (!(tmp= alloc_root(ctx->alloc, (uint) strlen(option) + 1)))
return 1;
if (insert_dynamic(ctx->args, (gptr) &tmp))
return 1;
......
Markdown is supported
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