X-Git-Url: https://mattmccutchen.net/rsync/rsync.git/blobdiff_plain/deee574b1198a2886369f4ecbfbeaa6f851bb41d..c9bce0b8f8a485f11ce4f90356e9346036f14daf:/options.c diff --git a/options.c b/options.c index 05df91e4..47fdaa3d 100644 --- a/options.c +++ b/options.c @@ -613,8 +613,9 @@ static char err_buf[200]; void option_error(void) { if (!err_buf[0]) { - strcpy(err_buf, "Error parsing options: " - "option may be supported on client but not on server?\n"); + strlcpy(err_buf, "Error parsing options: option may " + "be supported on client but not on server?\n", + sizeof err_buf); } rprintf(FERROR, RSYNC_NAME ": %s", err_buf); @@ -832,7 +833,9 @@ int parse_arguments(int *argc, const char ***argv, int frommain) case OPT_DAEMON: if (am_daemon) { - strcpy(err_buf, "Attempt to hack rsync thwarted!\n"); + strlcpy(err_buf, + "Attempt to hack rsync thwarted!\n", + sizeof err_buf); return 0; } poptFreeContext(pc);