diff options
author | Justus Winter <justus@g10code.com> | 2015-11-19 15:48:01 +0100 |
---|---|---|
committer | Justus Winter <justus@g10code.com> | 2015-11-19 15:48:01 +0100 |
commit | 52f7f195b119dc01bdf3ae200fdc8e04a0bb9bcb (patch) | |
tree | adeda290f4507c35d93e65bca58db8cb0c91fbf1 /g10/trust.c | |
parent | scd: Improve error handling. (diff) | |
download | gnupg2-52f7f195b119dc01bdf3ae200fdc8e04a0bb9bcb.tar.xz gnupg2-52f7f195b119dc01bdf3ae200fdc8e04a0bb9bcb.zip |
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@g10code.com>
Diffstat (limited to 'g10/trust.c')
-rw-r--r-- | g10/trust.c | 2 |
1 files changed, 1 insertions, 1 deletions
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); |