aboutsummaryrefslogtreecommitdiffstats
path: root/src/afb-evt.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/afb-evt.c')
-rw-r--r--src/afb-evt.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/afb-evt.c b/src/afb-evt.c
index e06d06e1..d361c954 100644
--- a/src/afb-evt.c
+++ b/src/afb-evt.c
@@ -84,7 +84,7 @@ struct afb_evtid {
int id;
/* fullname of the event */
- char fullname[1];
+ char fullname[];
};
/*
@@ -316,7 +316,7 @@ struct afb_evtid *afb_evt_evtid_create(const char *fullname)
/* allocates the event */
len = strlen(fullname);
- evtid = malloc(len + sizeof * evtid);
+ evtid = malloc(len + 1 + sizeof * evtid);
if (evtid == NULL)
goto error;