Kaynağa Gözat

Let dpkg-gencontrol bail out with an error if parsedep
found an error while parsing a dependency field. Closes: #228125

Frank Lichtenheld 20 yıl önce
ebeveyn
işleme
c0d0233fb7
3 değiştirilmiş dosya ile 16 ekleme ve 1 silme
  1. 5 0
      ChangeLog
  2. 8 0
      debian/changelog
  3. 3 1
      scripts/dpkg-gencontrol.pl

+ 5 - 0
ChangeLog

@@ -1,3 +1,8 @@
+2005-08-27  Frank Lichtenheld  <djpig@debian.org>
+
+       * scripts/dpkg-gencontrol: Bail out with an error if parsedep
+       found an error while parsing a dependency field.
+
 2005-08-17  Scott James Remnant  <scott@netsplit.com>
 2005-08-17  Scott James Remnant  <scott@netsplit.com>
 
 
 	* configure.ac: Bump version to 1.13.12~.
 	* configure.ac: Bump version to 1.13.12~.

+ 8 - 0
debian/changelog

@@ -1,3 +1,11 @@
+dpkg (1.13.12~) unstable; urgency=low
+
+  [Frank Lichtenheld]
+  * Let dpkg-gencontrol bail out with an error if parsedep
+    found an error while parsing a dependency field. Closes: #228125
+
+ --
+
 dpkg (1.13.11.1) unstable; urgency=low
 dpkg (1.13.11.1) unstable; urgency=low
 
 
   * Change maintainers to new team.
   * Change maintainers to new team.

+ 3 - 1
scripts/dpkg-gencontrol.pl

@@ -182,7 +182,9 @@ for $_ (keys %fi) {
     } elsif (s/^C$myindex //) {
     } elsif (s/^C$myindex //) {
         if (m/^(Package|Description|Essential|Optional)$/) {
         if (m/^(Package|Description|Essential|Optional)$/) {
         } elsif (exists($pkg_dep_fields{$_})) {
         } elsif (exists($pkg_dep_fields{$_})) {
-            $f{$_}= showdep(parsedep(substvars($v)), 0);
+           my $dep = parsedep(substvars($v));
+           &error("error occoured while parsing $_") unless defined $dep;
+            $f{$_}= showdep($dep, 0);
         } elsif (m/^Section$|^Priority$/) {
         } elsif (m/^Section$|^Priority$/) {
         } elsif (m/^Architecture$/) {
         } elsif (m/^Architecture$/) {
         } elsif (s/^X[CS]*B[CS]*-//i) {
         } elsif (s/^X[CS]*B[CS]*-//i) {