removed check and #includes for malloc.h, since it's not needed
[xboard.git] / uci.c
diff --git a/uci.c b/uci.c
index 5eeda2b..f78fb2c 100644 (file)
--- a/uci.c
+++ b/uci.c
 #include <stdlib.h>
 #include <string.h>
 
-#if HAVE_MALLOC_H
-  #include <malloc.h>
-#endif
-
 #include "common.h"
 #include "backend.h"
 Boolean GetArgValue(char *a);                          
@@ -55,8 +51,8 @@ void InitEngineUCI( const char * iniDir, ChessProgramState * cps )
             if(cps == &second) { // change options for first into those for second engine
               if(strstr(buf, "first") == buf) sprintf(argName, "second%s", buf+5); else
               if(buf[0] == 'f') sprintf(argName, "s%s", buf+1); else
-              strcpy(argName, buf);
-            } else strcpy(argName, buf);
+               safeStrCpy(argName, buf, sizeof(argName)/sizeof(argName[0]));
+            } else safeStrCpy(argName, buf, sizeof(argName)/sizeof(argName[0]));
             if(GetArgValue(argName)) { // look up value of option with this name
               s = argName;
               while(*s) *q++ = *s++;