tags 628726 + patch
thanks

Hi,

Was a bit bored and wrote a small patch fixing the "uninitialized"
values, but it does not sanity beyond that (so the --is --vendor issue
still exists with this patch).

~Niels

>From 4e634b8913d58d46b6a7fafb300d9f62ed1abaf7 Mon Sep 17 00:00:00 2001
From: Niels Thykier <ni...@thykier.net>
Date: Sun, 5 Jun 2011 00:31:49 +0200
Subject: [PATCH] Made dpkg-vendor fail on missing parameters for req.
 arguments

---
 scripts/dpkg-vendor.pl |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/scripts/dpkg-vendor.pl b/scripts/dpkg-vendor.pl
index f59f4c6..f1dabe3 100755
--- a/scripts/dpkg-vendor.pl
+++ b/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;
-- 
1.7.4.4

Reply via email to