Home GnuPG
Diffusion GnuPG 1687dd35ee98

g10: fix uninit use

Description

g10: fix uninit use

* g10/encrypt.c (reencrypt_to_new_recipients): Drop first
  (and uninitialized) use of 'count'.

In reencrypt_to_new_recipients, count isn't used in the first loop
and we later initialise it before another loop (where it is used), so
drop the first bogus use, as the increment was working w/ an uninit var
otherwise.

Found by GCC's -fanalyzer.

  • Signed-off-by: Sam James <sam@gentoo.org>

Details

Provenance
Sam James via Gnupg-devel <gnupg-devel@gnupg.org>Authored on Wed, Jan 28, 1:35 PM
wernerCommitted on Tue, Feb 17, 9:21 AM
Parents
rG0f5c9c845fda: g10: check null in assert
Branches
Unknown
Tags
Unknown

Event Timeline

werner committed rG1687dd35ee98: g10: fix uninit use (authored by Sam James via Gnupg-devel <gnupg-devel@gnupg.org>).Tue, Feb 17, 9:21 AM