X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=winboard%2Fwsettings.c;h=a250e2e534f5cf9fcc3eb4169683b36af25b3674;hb=0ea1b434ac6becf79c75d85ba27de5b89666a7c3;hp=ac2c3b1044b1fb3bbe7a129c421547543e057c49;hpb=01768d1677ff891d503bbfa250b09d373bfa7422;p=xboard.git diff --git a/winboard/wsettings.c b/winboard/wsettings.c index ac2c3b1..a250e2e 100644 --- a/winboard/wsettings.c +++ b/winboard/wsettings.c @@ -323,7 +323,7 @@ GetOptionValues(HWND hDlg, ChessProgramState *cps) success = GetDlgItemText( hDlg, 2001+2*i, newText, MSG_SIZ - strlen(cps->option[j].name) - 9 ); if(!success) break; changed = strcmp(cps->option[j].textValue, newText) != 0; - strcpy(cps->option[j].textValue, newText); + safeStrCpy(cps->option[j].textValue, newText, sizeof(cps->option[j].textValue)/sizeof(cps->option[j].textValue[0]) ); break; case CheckBox: new = IsDlgButtonChecked( hDlg, 2000+2*i ); @@ -397,7 +397,7 @@ LRESULT CALLBACK SettingsProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lPa */ OPENFILENAME ofn; - strcpy( buf, "" ); + safeStrCpy( buf, "" , sizeof( buf)/sizeof( buf[0]) ); ZeroMemory( &ofn, sizeof(ofn) );