Several people have spotted an uninitialised structure member leading to a
authorjacob <jacob@cda61777-01e9-0310-a592-d414129be87e>
Sun, 26 Apr 2009 22:19:30 +0000 (22:19 +0000)
committerjacob <jacob@cda61777-01e9-0310-a592-d414129be87e>
Sun, 26 Apr 2009 22:19:30 +0000 (22:19 +0000)
potential crash on "reget" in Unix PSFTP.

git-svn-id: svn://svn.tartarus.org/sgt/putty@8516 cda61777-01e9-0310-a592-d414129be87e

unix/uxsftp.c

index a9af614..b26c4b5 100644 (file)
@@ -202,6 +202,7 @@ WFile *open_existing_wfile(char *name, uint64 *size)
 
     ret = snew(WFile);
     ret->fd = fd;
+    ret->name = dupstr(name);
 
     if (size) {
        struct stat statbuf;