diff --git a/bin/xbps-bin/main.c b/bin/xbps-bin/main.c index 3c2e4a51..eba530f6 100644 --- a/bin/xbps-bin/main.c +++ b/bin/xbps-bin/main.c @@ -76,7 +76,7 @@ list_pkgs_in_dict(prop_object_t obj, void *arg, bool *loop_done) if (!pkgver && !short_desc) return EINVAL; - tmp = malloc(lpc->pkgver_len + 1); + tmp = calloc(1, lpc->pkgver_len + 1); if (tmp == NULL) return errno;