1
0
mirror of https://github.com/MariaDB/server.git synced 2025-12-24 11:21:21 +03:00

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

final 0 of the string.
This commit is contained in:
cps@silver_beast.(none)
2004-09-06 18:19:19 +04:00
parent 11e4e18c14
commit d07557d687

View File

@@ -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;