The following commit has been merged in the master branch:
commit c07f7fea4206bc002578b2032871c9f63457bde8
Author: Raphaƫl Hertzog <[email protected]>
Date: Sat Nov 26 10:26:19 2011 +0100
dpkg: Error out if a database .list file is not a regular file
LP: #369898
Signed-off-by: Guillem Jover <[email protected]>
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;
--
dpkg's main repository
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]