Fix uninitialized var type_and_host
authorAdam Dickmeiss <adam@indexdata.dk>
Wed, 19 Mar 2003 09:45:55 +0000 (09:45 +0000)
committerAdam Dickmeiss <adam@indexdata.dk>
Wed, 19 Mar 2003 09:45:55 +0000 (09:45 +0000)
client/client.c

index 79e1ea1..3c45287 100644 (file)
@@ -2,7 +2,7 @@
  * Copyright (c) 1995-2003, Index Data
  * See the file LICENSE for details.
  *
  * Copyright (c) 1995-2003, Index Data
  * See the file LICENSE for details.
  *
- * $Id: client.c,v 1.185 2003-03-11 11:07:47 adam Exp $
+ * $Id: client.c,v 1.186 2003-03-19 09:45:55 adam Exp $
  */
 
 #include <stdio.h>
  */
 
 #include <stdio.h>
@@ -458,6 +458,9 @@ int cmd_open(const char *arg)
     }   
     cs_get_host_args(arg, &basep);
 
     }   
     cs_get_host_args(arg, &basep);
 
+    strncpy(type_and_host, arg, sizeof(type_and_host)-1);
+    type_and_host[sizeof(type_and_host)-1] = '\0';
+
     cmd_open_remember_last_open_command(arg,type_and_host);
 
     if (yazProxy)
     cmd_open_remember_last_open_command(arg,type_and_host);
 
     if (yazProxy)