diff options
Diffstat (limited to 'src/appl')
-rw-r--r-- | src/appl/gssftp/ftp/ftp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/appl/gssftp/ftp/ftp.c b/src/appl/gssftp/ftp/ftp.c index 6ef4e88..93ace90 100644 --- a/src/appl/gssftp/ftp/ftp.c +++ b/src/appl/gssftp/ftp/ftp.c @@ -1684,7 +1684,8 @@ void pswitch(int flag) ip->connect = connected; connected = op->connect; if (hostname) { - (void) strncpy(ip->name, hostname, sizeof(ip->name) - 1); + if (ip->name != hostname) + (void) strncpy(ip->name, hostname, sizeof(ip->name) - 1); ip->name[strlen(ip->name)] = '\0'; } else ip->name[0] = 0; |