X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=progs%2Ftset.c;h=bf3bf1929c285af5d51616ad9423139658d5fb4b;hp=2ee9c1190ba0aff9c7f0d8590ef27c757b6540d0;hb=85b1a478852e6473f6f698af5f6fca055f43f21c;hpb=a108bc76f220a81a223a5c25f59195af60452128 diff --git a/progs/tset.c b/progs/tset.c index 2ee9c119..bf3bf192 100644 --- a/progs/tset.c +++ b/progs/tset.c @@ -119,7 +119,7 @@ char *ttyname(int fd); #include #include -MODULE_ID("$Id: tset.c,v 1.87 2012/01/21 23:55:05 tom Exp $") +MODULE_ID("$Id: tset.c,v 1.89 2012/02/22 22:50:47 tom Exp $") /* * SCO defines TIOCGSIZE and the corresponding struct. Other systems (SunOS, @@ -213,10 +213,10 @@ failed(const char *msg) size_t len = strlen(_nc_progname) + 2; if ((int) len < (int) sizeof(temp) - 12) { - strcpy(temp, _nc_progname); - strcat(temp, ": "); + _nc_STRCPY(temp, _nc_progname, sizeof(temp)); + _nc_STRCAT(temp, ": ", sizeof(temp)); } else { - strcpy(temp, "tset: "); + _nc_STRCPY(temp, "tset: ", sizeof(temp)); } perror(strncat(temp, msg, sizeof(temp) - strlen(temp) - 2)); exit_error();