diff options
Diffstat (limited to 'usr.sbin/config/sem.c')
| -rw-r--r-- | usr.sbin/config/sem.c | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/usr.sbin/config/sem.c b/usr.sbin/config/sem.c index cabbb8f6caf..bf0528633d7 100644 --- a/usr.sbin/config/sem.c +++ b/usr.sbin/config/sem.c @@ -1,4 +1,4 @@ -/* $OpenBSD: sem.c,v 1.25 2002/03/14 16:44:24 mpech Exp $ */ +/* $OpenBSD: sem.c,v 1.26 2002/05/29 09:45:39 deraadt Exp $ */ /* $NetBSD: sem.c,v 1.10 1996/11/11 23:40:11 gwr Exp $ */ /* @@ -578,10 +578,12 @@ resolve(nvp, name, what, dflt, part) if (dev->d_major == maj) break; if (dev == NULL) - (void)sprintf(buf, "<%d/%d>", maj, min); + (void)snprintf(buf, sizeof buf, "<%d/%d>", + maj, min); else - (void)sprintf(buf, "%s%d%c", dev->d_name, - min / maxpartitions, (min % maxpartitions) + 'a'); + (void)snprintf(buf, sizeof buf, "%s%d%c", + dev->d_name, min / maxpartitions, + (min % maxpartitions) + 'a'); nv->nv_str = intern(buf); return (0); } |
