X-Git-Url: http://winboard.nl/cgi-bin?a=blobdiff_plain;f=xboard.c;h=d1d00a3231e26294326fcad3b85a239408078236;hb=c28f9557f19deb9621b179d3c6ccbdf0458bd304;hp=67992f14c90e6dbac4dfbd5bfede7427d3d00b83;hpb=91f35c4c0e1494e9711f26bb86f843e176c81321;p=xboard.git diff --git a/xboard.c b/xboard.c index 67992f1..d1d00a3 100644 --- a/xboard.c +++ b/xboard.c @@ -5815,7 +5815,7 @@ SendPositionSelection(Widget w, Atom *selection, Atom *target, * automatically call XtFree on the value returned. So have to * make a copy of it allocated with XtMalloc */ selection_tmp= XtMalloc(strlen(selected_fen_position)+16); - safeStrCpy(selection_tmp, selected_fen_position, sizeof(selection_tmp)/sizeof(selection_tmp[0]) ); + safeStrCpy(selection_tmp, selected_fen_position, strlen(selected_fen_position)+16 ); *value_return=selection_tmp; *length_return=strlen(selection_tmp);