Fix false ***buffer overflow*** detection
[src/app-framework-binder.git] / src / afb-export.c
index bfd7653..62be904 100644 (file)
@@ -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 {