X-Git-Url: https://gerrit.automotivelinux.org/gerrit/gitweb?a=blobdiff_plain;f=src%2Fglobset.c;h=5e414ddf6ed38979ab34f1b01530b494ee5e6ba4;hb=f3d1f19ae308cc0559728c0ccf6281cbce5ee37c;hp=228d85233c377edb3139fd886a3b338e7de2c927;hpb=bc247d4c9e16e548c84466d8975529568e7c395d;p=src%2Fapp-framework-binder.git diff --git a/src/globset.c b/src/globset.c index 228d8523..5e414ddf 100644 --- a/src/globset.c +++ b/src/globset.c @@ -1,5 +1,5 @@ /* - * Copyright (C) 2018 "IoT.bzh" + * Copyright (C) 2018, 2019 "IoT.bzh" * Author: José Bollo * * Licensed under the Apache License, Version 2.0 (the "License"); @@ -323,7 +323,7 @@ int globset_add( } /* not found, create it */ - ph = malloc(len + sizeof *ph); + ph = malloc(1 + len + sizeof *ph); if (!ph) return -1;