https://bugzilla.mindrot.org/show_bug.cgi?id=2561

Darren Tucker <[email protected]> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
   Attachment #3003|ok?([email protected])     |ok-
              Flags|                            |

--- Comment #12 from Darren Tucker <[email protected]> ---
Comment on attachment 3003
  --> https://bugzilla.mindrot.org/attachment.cgi?id=3003
update to current

>+              public = private = NULL;
>+              xasprintf(&prv_tmp, "%s%s.XXXXXXXXXX",
>+                  identity_file, key_types[i].path);
>+              xasprintf(&pub_tmp, "%s%s.pub.XXXXXXXXXX",
>+                  identity_file, key_types[i].path);
>+              xasprintf(&prv_file, "%s%s",
>+                  identity_file, key_types[i].path);
>+              xasprintf(&pub_file, "%s%s.pub",
>+                  identity_file, key_types[i].path);
>+
>+              if (stat(prv_file, &st) == 0) {
>+                      if (st.st_size != 0)
>+                              continue;

This will leak prv_tmp and friends in the case where the key already
exists.
The next iteration of the loop will allocate them again, leaking the
first.

-- 
You are receiving this mail because:
You are watching the assignee of the bug.
You are watching someone on the CC list of the bug.
_______________________________________________
openssh-bugs mailing list
[email protected]
https://lists.mindrot.org/mailman/listinfo/openssh-bugs

Reply via email to