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

guillem pushed a commit to branch main
in repository dpkg.

View the commit online:
https://git.dpkg.org/cgit/dpkg/dpkg.git/commit/?id=09687d564ce40a4f56fe2a9eadb32d92b810f6e5

commit 09687d564ce40a4f56fe2a9eadb32d92b810f6e5
Author: Guillem Jover <guil...@debian.org>
AuthorDate: Sun Jan 30 02:05:37 2022 +0100

    libdpkg: Do not allow argv with no arguments
---
 lib/dpkg/options.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/lib/dpkg/options.c b/lib/dpkg/options.c
index b86467dd9..4244b7dec 100644
--- a/lib/dpkg/options.c
+++ b/lib/dpkg/options.c
@@ -218,6 +218,9 @@ dpkg_options_parse(const char *const **argvp, const struct 
cmdinfo *cmdinfos,
   const char *p, *value;
   int l;
 
+  if (**argvp == NULL)
+    badusage(_("missing program name in argv[0]"));
+
   printforhelp = help_str;
 
   ++(*argvp);

-- 
Dpkg.Org's dpkg

Reply via email to