]> asedeno.scripts.mit.edu Git - PuTTY.git/commitdiff
Small memory allocation bug in openssh_encrypted() fixed.
authorSimon Tatham <anakin@pobox.com>
Sat, 15 Jun 2002 15:37:15 +0000 (15:37 +0000)
committerSimon Tatham <anakin@pobox.com>
Sat, 15 Jun 2002 15:37:15 +0000 (15:37 +0000)
[originally from svn r1732]

import.c

index 2ff3698065d5bcb4200f2675b5857d9163172aaa..7ad09ac7f1a43d961ff0c8718bb985ac476a48fa 100644 (file)
--- a/import.c
+++ b/import.c
@@ -62,7 +62,7 @@ int import_target_type(int type)
 int import_encrypted(char *filename, int type, char **comment)
 {
     if (type == SSH_KEYTYPE_OPENSSH) {
-       *comment = filename;           /* OpenSSH doesn't do key comments */
+       *comment = dupstr(filename);   /* OpenSSH doesn't do key comments */
        return openssh_encrypted(filename);
     }
     if (type == SSH_KEYTYPE_SSHCOM) {