* 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 <[email protected]>
---
 g10/encrypt.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/g10/encrypt.c b/g10/encrypt.c
index b305ce938..19b2f7d13 100644
--- a/g10/encrypt.c
+++ b/g10/encrypt.c
@@ -1114,7 +1114,7 @@ reencrypt_to_new_recipients (ctrl_t ctrl, int armor, 
const char *filename,
    * recipient.  We can't do that for wildcards, though.  */
   if (!ctrl->clear_recipients)
     {
-      for (el = sesenc_list; el; el = el->next, count++)
+      for (el = sesenc_list; el; el = el->next)
         {
           if (el->u_sym)
             continue;
-- 
2.52.0


_______________________________________________
Gnupg-devel mailing list
[email protected]
https://lists.gnupg.org/mailman/listinfo/gnupg-devel

Reply via email to