]> git.sesse.net Git - stockfish/blobdiff - src/search.cpp
Prefer strncpy() to strcpy()
[stockfish] / src / search.cpp
index 71da3ec18a985f04b340b544959c396846184f6d..e4675df56ea35b75b39a14c9672e901310d3f6e5 100644 (file)
@@ -2135,7 +2135,7 @@ namespace {
     if(data) {
       char input[256];
       if(fgets(input, 255, stdin) == NULL)
-        strcpy(input, "quit\n");
+        strncpy(input, "quit\n", 5);
       if(strncmp(input, "quit", 4) == 0) {
         AbortSearch = true;
         PonderSearch = false;