X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=uci.c;fp=uci.c;h=ab2cea926cedf2dba1b223cdf17538543393f3b5;hb=0ea1b434ac6becf79c75d85ba27de5b89666a7c3;hp=5eeda2b5ebc83639d60a0fa1cbbf052b45abaa76;hpb=01768d1677ff891d503bbfa250b09d373bfa7422;p=xboard.git diff --git a/uci.c b/uci.c index 5eeda2b..ab2cea9 100644 --- a/uci.c +++ b/uci.c @@ -55,8 +55,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++;