xbps-bin: zero out allocated mem to avoid garbage in the 'list' target.
This commit is contained in:
parent
237991fd79
commit
4f6e20c431
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user