This is an automated email from the git hooks/post-receive script.

guillem pushed a commit to branch master
in repository dpkg.

commit f87f8d43113a48e2a9b5261dca758e87895721f2
Author: Guillem Jover <[email protected]>
Date:   Wed Mar 15 13:33:09 2017 +0100

    dpkg: Switch DEBIAN/conffile parsing assert() into an ohshit()
    
    This is a run-time error, not a programming error.
---
 debian/changelog | 2 ++
 src/unpack.c     | 3 ++-
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/debian/changelog b/debian/changelog
index 848ce0c..6581484 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -38,6 +38,8 @@ dpkg (1.19.1) UNRELEASED; urgency=medium
     Thanks to Jack Bates <[email protected]>
   * Increment the line number on dpkg --set-selections on unknown packages.
     Reported by Heinz Repp <[email protected]>. Closes: #888983
+  * Switch a DEBIAN/conffile parsing assert() in dpkg due to empty lines
+    into an ohshit(), because this is really a run-time error.
   * Architecture support:
     - Add support for riscv64 CPU. Closes: #822914
       Thanks to Manuel A. Fernandez Montecelo <[email protected]>
diff --git a/src/unpack.c b/src/unpack.c
index 45d3ff6..ed24272 100644
--- a/src/unpack.c
+++ b/src/unpack.c
@@ -345,7 +345,8 @@ deb_parse_conffiles(struct pkginfo *pkg, const char 
*control_conffiles,
     char *p;
 
     p = conffilenamebuf + strlen(conffilenamebuf);
-    assert(p != conffilenamebuf);
+    if (p == conffilenamebuf)
+      ohshit(_("conffile file contains an empty line"));
     if (p[-1] != '\n')
       ohshit(_("conffile name '%s' is too long, or missing final newline"),
              conffilenamebuf);

-- 
Alioth's /usr/local/bin/git-commit-notice on 
/srv/git.debian.org/git/dpkg/dpkg.git

Reply via email to