summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog1
-rw-r--r--src/filesdb.c4
2 files changed, 5 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index 3e006b4..93bac35 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -57,6 +57,7 @@ dpkg (1.16.2) UNRELEASED; urgency=low
dependencies for another architecture. This is really basic for now since
it assumes all build dependencies must be satisfied on the listed
architecture. Closes: #648180 Thanks to Colin Watson for the patch.
+ * Error out if a dpkg database .list file is not a regular file. LP: #369898
[ Jonathan Nieder ]
* Bump po4a version in Build-Depends to 0.41, since earlier versions do
diff --git a/src/filesdb.c b/src/filesdb.c
index 0985d07..e7506c2 100644
--- a/src/filesdb.c
+++ b/src/filesdb.c
@@ -325,6 +325,10 @@ ensure_packagefiles_available(struct pkginfo *pkg)
ohshite(_("unable to stat files list file for package '%.250s'"),
pkg->set->name);
+ if (!S_ISREG(stat_buf.st_mode))
+ ohshit(_("files list for package '%.250s' is not a regular file"),
+ pkg->set->name);
+
if (stat_buf.st_size) {
loaded_list = nfmalloc(stat_buf.st_size);
loaded_list_end = loaded_list + stat_buf.st_size;