aboutsummaryrefslogtreecommitdiffstats
path: root/src/afb-export.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/afb-export.c')
-rw-r--r--src/afb-export.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/afb-export.c b/src/afb-export.c
index bfd76539..62be9040 100644
--- a/src/afb-export.c
+++ b/src/afb-export.c
@@ -163,7 +163,7 @@ struct afb_export
} export;
/* initial name */
- char name[1];
+ char name[];
};
/*****************************************************************************/
@@ -1271,7 +1271,7 @@ static struct afb_export *create(
return NULL;
}
lenapi = strlen(apiname);
- export = calloc(1, sizeof *export + lenapi + (path == apiname || !path ? 0 : strlen(path)));
+ export = calloc(1, sizeof *export + 1 + lenapi + (path == apiname || !path ? 0 : strlen(path)));
if (!export)
errno = ENOMEM;
else {