From 16fd25dc0552d14430efa5d4aba1542c2c6bddb8 Mon Sep 17 00:00:00 2001 From: itojun Date: Wed, 16 Jul 2003 06:33:11 +0000 Subject: [PATCH] snprintf --- usr.sbin/moused/moused.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.sbin/moused/moused.c b/usr.sbin/moused/moused.c index 5833a4c10307..8721820cdd1a 100644 --- a/usr.sbin/moused/moused.c +++ b/usr.sbin/moused/moused.c @@ -1,4 +1,4 @@ -/* $NetBSD: moused.c,v 1.11 2002/09/23 12:48:06 mycroft Exp $ */ +/* $NetBSD: moused.c,v 1.12 2003/07/16 06:33:11 itojun Exp $ */ /** ** Copyright (c) 1995 Michael Smith, All rights reserved. ** @@ -48,7 +48,7 @@ #include #ifndef lint -__RCSID("$NetBSD: moused.c,v 1.11 2002/09/23 12:48:06 mycroft Exp $"); +__RCSID("$NetBSD: moused.c,v 1.12 2003/07/16 06:33:11 itojun Exp $"); #endif /* not lint */ #include @@ -2656,7 +2656,7 @@ pnpparse(pnpid_t *id, char *buf, int len) if ((id->nserial > 0) || (id->nclass > 0) || (id->ncompat > 0) || (id->ndescription > 0)) { debug("PnP checksum: 0x%X", sum); - sprintf(s, "%02X", sum & 0x0ff); + snprintf(s, sizeof(s), "%02X", sum & 0x0ff); if (strncmp(s, &buf[len - 3], 2) != 0) { #if 0 /*