lib/initend.c: CID 62720 (NULL pointer dereference)
This commit is contained in:
parent
4be2a0ee84
commit
a730a61df9
@ -120,7 +120,7 @@ store_preserved_file(struct xbps_handle *xhp, const char *file)
|
||||
|
||||
len = strlen(globbuf.gl_pathv[i]) - strlen(xhp->rootdir) + 1;
|
||||
p = malloc(len);
|
||||
assert(len);
|
||||
assert(p);
|
||||
strlcpy(p, globbuf.gl_pathv[i] + strlen(xhp->rootdir), len);
|
||||
xbps_array_add_cstring(xhp->preserved_files, p);
|
||||
xbps_dbg_printf(xhp, "Added preserved file: %s (expanded from %s)\n", p, file);
|
||||
|
Loading…
Reference in New Issue
Block a user