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=40de82bf20b083eb1ce17a084a1b77e53b0af977

commit 40de82bf20b083eb1ce17a084a1b77e53b0af977
Author: Guillem Jover <guil...@debian.org>
AuthorDate: Tue Dec 7 22:41:39 2021 +0100

    libdpkg: Check that cip is not NULL before dereferencing it
    
    While no current caller passes a NULL cip argument, this still trips
    over code analyzers, and it is safer to check in case of future uses.
    
    Warned-by: coverity
    Changelog: internal
---
 lib/dpkg/options.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/dpkg/options.c b/lib/dpkg/options.c
index 2107a774c..b86467dd9 100644
--- a/lib/dpkg/options.c
+++ b/lib/dpkg/options.c
@@ -318,6 +318,6 @@ setaction(const struct cmdinfo *cip, const char *value)
              option_short(cip->oshort), cip->olong,
              option_short(cipaction->oshort), cipaction->olong);
   cipaction = cip;
-  if (cip->takesvalue == 2 && cip->sassignto)
+  if (cip && cip->takesvalue == 2 && cip->sassignto)
     *cipaction->sassignto = value;
 }

-- 
Dpkg.Org's dpkg

Reply via email to