bin/xbps-pkgdb/check_pkg_symlinks.c: buffer not NUL terminated (CID 62665)
This commit is contained in:
parent
b5713ecf12
commit
810c5d8de0
@ -106,10 +106,10 @@ check_pkg_symlinks(struct xbps_handle *xhp, const char *pkgname, void *arg)
|
||||
snprintf(path, sizeof(path), "%s%s", xhp->rootdir, file);
|
||||
snprintf(tgt_path, sizeof(tgt_path), "%s%s", xhp->rootdir, tgt);
|
||||
|
||||
strncpy(tgt_path, tgt, sizeof(tgt_path));
|
||||
strncpy(tgt_path, tgt, sizeof(tgt_path)-1);
|
||||
} else {
|
||||
strncpy(path, file, sizeof(path));
|
||||
strncpy(tgt_path, tgt, sizeof(tgt_path));
|
||||
strncpy(path, file, sizeof(path)-1);
|
||||
strncpy(tgt_path, tgt, sizeof(tgt_path)-1);
|
||||
}
|
||||
|
||||
if ((lnk = symlink_target(pkgname, path)) == NULL)
|
||||
|
Loading…
Reference in New Issue
Block a user