Radish alpha
H
HardenedBSD Package Manager
Radicle
Git (anonymous pull)
Log in to clone via SSH
Also need to avoid anything that isn't a regular file -- eg. symbolic links to directories.
Matthew Seaman committed 14 years ago
commit 9ad882b905a521d32d479880564108f753fd4888
parent 5cffdb34c9229d5a3cb4196d3832f4faec7b8d59
1 file changed +5 -0
modified libpkg/pkg_elf.c
@@ -149,6 +149,11 @@ analyse_elf(const char *fpath, const char ***namelist)
		ret = EPKG_END; /* Empty file: no results */
		goto cleanup;
	}
+
	if (!S_ISREG(sb.st_mode)) {
+
		ret = EPKG_END;	/* Not a regular file */
+
		pkg_emit_error("Warning: %s not a regular file\n", fpath);
+
		goto cleanup;
+
	}
	if (( e = elf_begin(fd, ELF_C_READ, NULL)) == NULL) {
		ret = EPKG_FATAL;
		pkg_emit_error("elf_begin() for %s failed: %s", fpath, elf_errmsg(-1));