diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2001-09-03 11:19:06 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2001-09-03 11:19:06 +0000 |
commit | 95a9862f1713b5450d3ace22e4ff892e7517be24 (patch) | |
tree | e84bd381d2e21188d15f708f176b87a3435ee477 | |
parent | 31dfdcc554c0994b40195ad104ec0758fb122fcd (diff) |
snprintf
-rw-r--r-- | lib/libusb/usage.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/libusb/usage.c b/lib/libusb/usage.c index 927f32335a4..38e87871eaa 100644 --- a/lib/libusb/usage.c +++ b/lib/libusb/usage.c @@ -1,4 +1,4 @@ -/* $OpenBSD: usage.c,v 1.1 2001/09/02 17:50:40 pvalchev Exp $ */ +/* $OpenBSD: usage.c,v 1.2 2001/09/03 11:19:05 deraadt Exp $ */ /* $NetBSD: usage.c,v 1.11 2001/01/09 15:59:47 augustss Exp $ */ /* @@ -163,7 +163,7 @@ hid_usage_page(int i) for (k = 0; k < npages; k++) if (pages[k].usage == i) return pages[k].name; - sprintf(b, "0x%04x", i); + snprintf(b, sizeof b, "0x%04x", i); return b; } @@ -183,7 +183,7 @@ hid_usage_in_page(unsigned int u) for (j = 0; j < pages[k].pagesize; j++) { us = pages[k].page_contents[j].usage; if (us == -1) { - sprintf(b, "%s %d", + snprintf(b, sizeof b, "%s %d", pages[k].page_contents[j].name, i); return b; } @@ -191,7 +191,7 @@ hid_usage_in_page(unsigned int u) return pages[k].page_contents[j].name; } bad: - sprintf(b, "0x%04x", i); + snprintf(b, sizeof b, "0x%04x", i); return b; } |