strcpy -> strncpy (from freebsd).

This commit is contained in:
mrg 1996-12-11 00:30:20 +00:00
parent 6913afc057
commit 2883126ca7

View File

@ -29,7 +29,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*
* $Id: modstat.c,v 1.6 1995/06/27 00:18:19 jtc Exp $
* $Id: modstat.c,v 1.7 1996/12/11 00:30:20 mrg Exp $
*/
#include <stdio.h>
@ -73,7 +73,7 @@ dostat(devfd, modnum, modname)
struct lmc_stat sbuf;
if (modname != NULL)
strcpy(sbuf.name, modname);
strncpy(sbuf.name, modname, sizeof sbuf.name);
sbuf.id = modnum;