diff options
Diffstat (limited to 'src/afb-trace.c')
-rw-r--r-- | src/afb-trace.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/afb-trace.c b/src/afb-trace.c index ffb03059..c750aca0 100644 --- a/src/afb-trace.c +++ b/src/afb-trace.c @@ -65,7 +65,7 @@ /* struct for tags */ struct tag { struct tag *next; /* link to the next */ - char tag[1]; /* name of the tag */ + char tag[]; /* name of the tag */ }; /* struct for events */ @@ -1071,7 +1071,7 @@ static struct tag *trace_get_tag(struct afb_trace *trace, const char *name, int if (!tag && alloc) { /* creation if needed */ - tag = malloc(sizeof * tag + strlen(name)); + tag = malloc(sizeof * tag + 1 + strlen(name)); if (tag) { strcpy(tag->tag, name); tag->next = trace->tags; |