Просмотр исходного кода

dpkg-vendor: fail on missing parameters for required arguments

Signed-off-by: Raphaël Hertzog <hertzog@debian.org>
Niels Thykier лет назад: 15
Родитель
Сommit
b3d0bb4a4c
2 измененных файлов с 4 добавлено и 0 удалено
  1. 2 0
      debian/changelog
  2. 2 0
      scripts/dpkg-vendor.pl

+ 2 - 0
debian/changelog

@@ -28,6 +28,8 @@ dpkg (1.16.1) UNRELEASED; urgency=low
   * Add the extraction part of Dpkg::Source::Package to the supported API.
     Useful to extract source packages without having to depend on dpkg-source
     (and hence dpkg-dev).
+  * Check presence of required parameters in dpkg-vendor. Closes: #628726
+    Thanks to Niels Thykier <niels@thykier.net> for the patch.
 
   [ Guillem Jover ]
   * Install deb-src-control(5) man pages in dpkg-dev. Closes: #620520

+ 2 - 0
scripts/dpkg-vendor.pl

@@ -61,11 +61,13 @@ while (@ARGV) {
     $_ = shift(@ARGV);
     if (m/^--vendor$/) {
         $vendor = shift(@ARGV);
+        usageerr(_g("%s needs a parameter"), $_) unless defined $vendor;
     } elsif (m/^--(is|derives-from|query)$/) {
         usageerr(_g("two commands specified: --%s and --%s"), $1, $action)
             if defined($action);
         $action = $1;
         $param = shift(@ARGV);
+        usageerr(_g("%s needs a parameter"), $_) unless defined $param;
     } elsif (m/^-(h|-help)$/) {
         usage();
         exit 0;