From 52f7f195b119dc01bdf3ae200fdc8e04a0bb9bcb Mon Sep 17 00:00:00 2001 From: Justus Winter Date: Thu, 19 Nov 2015 15:48:01 +0100 Subject: [PATCH] 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 --- g10/trust.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/g10/trust.c b/g10/trust.c index a89b0e5e8..f46aeeaeb 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);