summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog1
-rw-r--r--lib/dpkg/pkg-format.c3
2 files changed, 4 insertions, 0 deletions
diff --git a/debian/changelog b/debian/changelog
index 074a3d6..19d9914 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,7 @@ dpkg (1.16.9) UNRELEASED; urgency=low
[ Raphaël Hertzog ]
* Fix dpkg-source regression in "3.0 (quilt)" source packages while
unapplying patches that remove all files in a directory. Closes: #683547
+ * Fix segfault of “dpkg-query -W -f ''”.
[ Updated programs translations ]
* Czech (Miroslav Kure).
diff --git a/lib/dpkg/pkg-format.c b/lib/dpkg/pkg-format.c
index 3183922..74a8599 100644
--- a/lib/dpkg/pkg-format.c
+++ b/lib/dpkg/pkg-format.c
@@ -208,6 +208,9 @@ pkg_format_parse(const char *fmt, struct dpkg_error *err)
}
}
+ if (!head)
+ dpkg_put_error(err, _("may not be empty string"));
+
return head;
}