X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fafb-export.c;h=b46e6a085251b3df3ab150c622c584d725a23316;hb=60cd11786766ebc148b7ec088962dd6e112f8762;hp=8ebe8e060abcdbba3f96249e8f75df44ffaf47ff;hpb=16f014ef35b8355de1006891fe6920c8b51675fe;p=src%2Fapp-framework-binder.git diff --git a/src/afb-export.c b/src/afb-export.c index 8ebe8e06..b46e6a08 100644 --- a/src/afb-export.c +++ b/src/afb-export.c @@ -170,7 +170,7 @@ struct afb_export } export; /* initial name */ - char name[1]; + char name[]; }; /*****************************************************************************/ @@ -1372,7 +1372,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 {