diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-08-31 12:56:09 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 1996-08-31 12:56:09 +0000 |
commit | 5107a4b7e22f40b117536853264ff985555e9a02 (patch) | |
tree | d76c6873ebe74863e4f4b578e79a06c3211c288e /usr.sbin/eeprom/ophandlers.c | |
parent | 6a142e81fcb2c69c6777c6d44292508865f22bfa (diff) |
buf oflow in some more "NetBSD Foundation" code
Diffstat (limited to 'usr.sbin/eeprom/ophandlers.c')
-rw-r--r-- | usr.sbin/eeprom/ophandlers.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/usr.sbin/eeprom/ophandlers.c b/usr.sbin/eeprom/ophandlers.c index 209f1353144..8aad8c34ae2 100644 --- a/usr.sbin/eeprom/ophandlers.c +++ b/usr.sbin/eeprom/ophandlers.c @@ -1,4 +1,4 @@ -/* $OpenBSD: ophandlers.c,v 1.2 1996/03/25 15:55:22 niklas Exp $ */ +/* $OpenBSD: ophandlers.c,v 1.3 1996/08/31 12:56:08 deraadt Exp $ */ /* $NetBSD: ophandlers.c,v 1.2 1996/02/28 01:13:30 thorpej Exp $ */ /*- @@ -71,7 +71,7 @@ static struct extabent opextab[] = { }; #define BARF(str1, str2) { \ - sprintf(err_str, "%s: %s", (str1), (str2)); \ + snprintf(err_str, sizeof err_str "%s: %s", (str1), (str2)); \ ++eval; \ return (err_str); \ }; @@ -146,7 +146,8 @@ op_handler(keyword, arg) BARF("OPIOCGET", strerror(errno)); if (opio.op_buflen <= 0) { - sprintf(err_str, "nothing available for %s", + snprintf(err_str, sizeof err_str, + "nothing available for %s", keyword); return (err_str); } |