Navigation Menu

Skip to content

Commit

Permalink
schema: fix a bug calling strcpy against not nul terminated string
Browse files Browse the repository at this point in the history
  • Loading branch information
kou committed Oct 20, 2015
1 parent 5d6b877 commit b515a96
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/proc.c
Expand Up @@ -7925,6 +7925,7 @@ proc_schema_column_output_sources(grn_ctx *ctx, grn_obj *column)
char name[GRN_TABLE_MAX_KEY_SIZE];
unsigned int name_size;
name_size = grn_obj_name(ctx, source, name, GRN_TABLE_MAX_KEY_SIZE);
name[name_size] = '\0';
grn_strcat(name, GRN_TABLE_MAX_KEY_SIZE, "._key");
GRN_OUTPUT_CSTR(name);
} else {
Expand Down
Expand Up @@ -302,7 +302,7 @@ schema
{
"name": "_key",
"table": "Posts",
"full_name": "Posts._key"
"full_name": "Posts._key"
},
{
"name": "title",
Expand Down

0 comments on commit b515a96

Please sign in to comment.