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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user