X-Git-Url: https://ncurses.scripts.mit.edu/?p=ncurses.git;a=blobdiff_plain;f=ncurses%2Ftinfo%2Flib_print.c;h=0dab4d45911530e21d3805842da7d3d92e28edb9;hp=c7bd3a62fa87b1e3794890f93b8a4fb0c25b0404;hb=5eb177874dea59107a1a2ea44f5d8f5bb99550b2;hpb=6b43eaddcd1d9397fb3d51ce4c34f02472e93417 diff --git a/ncurses/tinfo/lib_print.c b/ncurses/tinfo/lib_print.c index c7bd3a62..0dab4d45 100644 --- a/ncurses/tinfo/lib_print.c +++ b/ncurses/tinfo/lib_print.c @@ -1,5 +1,5 @@ /**************************************************************************** - * Copyright (c) 1998-2009,2010 Free Software Foundation, Inc. * + * Copyright (c) 1998-2011,2012 Free Software Foundation, Inc. * * * * Permission is hereby granted, free of charge, to any person obtaining a * * copy of this software and associated documentation files (the * @@ -39,7 +39,7 @@ #define CUR SP_TERMTYPE #endif -MODULE_ID("$Id: lib_print.c,v 1.20 2010/06/05 22:18:35 tom Exp $") +MODULE_ID("$Id: lib_print.c,v 1.23 2012/02/22 22:34:31 tom Exp $") NCURSES_EXPORT(int) NCURSES_SP_NAME(mcprint) (NCURSES_SP_DCLx char *data, int len) @@ -76,10 +76,10 @@ NCURSES_SP_NAME(mcprint) (NCURSES_SP_DCLx char *data, int len) return (ERR); } - (void) strcpy(mybuf, switchon); - memcpy(mybuf + onsize, data, (unsigned) len); + _nc_STRCPY(mybuf, switchon, need); + memcpy(mybuf + onsize, data, (size_t) len); if (offsize) - (void) strcpy(mybuf + onsize + len, prtr_off); + _nc_STRCPY(mybuf + onsize + len, prtr_off, need); /* * We're relying on the atomicity of UNIX writes here. The