security fix: replaced strcpy with safeStrCpy from backend.c
[xboard.git] / engineoutput.c
index 6266f7c..cf17e41 100644 (file)
@@ -492,6 +492,7 @@ void OutputKibitz(int window, char *text)
        }
        opponentKibitzes = TRUE; // this causes split window DisplayMode in ICS modes.
        VerifyDisplayMode();
+       strncpy(text+strlen(text)-1, "\r\n",sizeof(text+strlen(text)-1)); // to not lose line breaks on copying
        if(gameMode == IcsObserving) {
            DoSetWindowText(0, nLabel, gameInfo.white);
            SetIcon( 0, nColorIcon,  nColorWhite);