diff options
Diffstat (limited to 'source3/client/client.c')
-rw-r--r-- | source3/client/client.c | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/source3/client/client.c b/source3/client/client.c index 1248c25659..5da12fd984 100644 --- a/source3/client/client.c +++ b/source3/client/client.c @@ -1291,7 +1291,7 @@ static int file_find(struct file_list **list, const char *directory, int ret; char *path; BOOL isdir; - const char *dname; + char *dname; dir = opendir(directory); if (!dir) return -1; @@ -2269,9 +2269,6 @@ static void readline_callback(void) last_t = t; - if (cli->fd == -1) - return; - again: FD_ZERO(&fds); FD_SET(cli->fd,&fds); @@ -2349,7 +2346,7 @@ static struct cli_state *do_connect(const char *server, const char *share) char *sharename; /* make a copy so we don't modify the global string 'service' */ - fstrcpy(servicename, share); + safe_strcpy(servicename, share, sizeof(servicename)-1); sharename = servicename; if (*sharename == '\\') { server = sharename+2; @@ -2624,9 +2621,9 @@ static int do_message_op(void) make_nmb_name(&calling, global_myname(), 0x0); make_nmb_name(&called , desthost, name_type); - fstrcpy(server_name, desthost); + safe_strcpy(server_name, desthost, sizeof(server_name)); snprintf(name_type_hex, sizeof(name_type_hex), "#%X", name_type); - fstrcat(server_name, name_type_hex); + safe_strcat(server_name, name_type_hex, sizeof(server_name)); zero_ip(&ip); if (have_ip) ip = dest_ip; |