[Pkg-gnupg-commit] [gnupg2] 148/241: g10: Avoid undefined behavior.

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 52f7f195b119dc01bdf3ae200fdc8e04a0bb9bcb
Author: Justus Winter <justus at g10code.com>
Date:   Thu Nov 19 15:48:01 2015 +0100

    g10: Avoid undefined behavior.
    
    * g10/trust.c (clean_one_uid): Avoid a computation involving an
    uninitialized value.
    --
    Found using the Clang Static Analyzer.
    
    Signed-off-by: Justus Winter <justus at g10code.com>
---
 g10/trust.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/g10/trust.c b/g10/trust.c
index a89b0e5..f46aeea 100644
--- a/g10/trust.c
+++ b/g10/trust.c
@@ -704,7 +704,7 @@ void
 clean_one_uid (kbnode_t keyblock, kbnode_t uidnode, int noisy, int self_only,
                int *uids_cleaned, int *sigs_cleaned)
 {
-  int dummy;
+  int dummy = 0;
 
   assert (keyblock->pkt->pkttype==PKT_PUBLIC_KEY);
   assert (uidnode->pkt->pkttype==PKT_USER_ID);

-- 
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