[Pkg-gnupg-commit] [gnupg2] 150/241: agent: Improve error handling.

Daniel Kahn Gillmor dkg at fifthhorseman.net
Wed Dec 9 20:32:09 UTC 2015


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

dkg pushed a commit to branch master
in repository gnupg2.

commit a1650b1edf80c2526c0576547b3a574e8d30f1fa
Author: Justus Winter <justus at g10code.com>
Date:   Thu Nov 19 16:18:20 2015 +0100

    agent: Improve error handling.
    
    * agent/trustlist.c (istrusted_internal): Initialize 'err'.
    --
    There is a plausible path of execution so that a branch condition uses
    the uninitialized value.
    
    Found using the Clang Static Analyzer.
    
    Signed-off-by: Justus Winter <justus at g10code.com>
---
 agent/trustlist.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/agent/trustlist.c b/agent/trustlist.c
index 175ebe4..af5f645 100644
--- a/agent/trustlist.c
+++ b/agent/trustlist.c
@@ -398,7 +398,7 @@ static gpg_error_t
 istrusted_internal (ctrl_t ctrl, const char *fpr, int *r_disabled,
                     int already_locked)
 {
-  gpg_error_t err;
+  gpg_error_t err = 0;
   int locked = already_locked;
   trustitem_t *ti;
   size_t len;

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-gnupg/gnupg2.git



More information about the Pkg-gnupg-commit mailing list