diff options
author | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-03-12 22:55:02 +0000 |
---|---|---|
committer | Theo de Raadt <deraadt@cvs.openbsd.org> | 2003-03-12 22:55:02 +0000 |
commit | a2fbae0e00ccc530ac73a7329de5f999067c734a (patch) | |
tree | cf02b99090be89259c0c5715124ab6f206bcf497 /usr.sbin/mrouted/snmp.c | |
parent | 78595d074d3702326e01061c3d4e267e806dea22 (diff) |
less sprintf
Diffstat (limited to 'usr.sbin/mrouted/snmp.c')
-rw-r--r-- | usr.sbin/mrouted/snmp.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/usr.sbin/mrouted/snmp.c b/usr.sbin/mrouted/snmp.c index 9bc9bc61b05..f3b5a265540 100644 --- a/usr.sbin/mrouted/snmp.c +++ b/usr.sbin/mrouted/snmp.c @@ -216,7 +216,8 @@ o_scalar(vp, name, length, exact, var_len, write_method) case dvmrpVersion: { static char buff[15]; - sprintf(buff, "mrouted%d.%d", PROTOCOL_VERSION, MROUTED_VERSION); + snprintf(buff, sizeof buff, "mrouted%d.%d", + PROTOCOL_VERSION, MROUTED_VERSION); *var_len = strlen(buff); return (u_char *)buff; } @@ -498,7 +499,7 @@ o_dvmrpNeighborTable(vp, name, length, exact, var_len, write_method) case dvmrpNeighborVersion: { static char buff[15]; - sprintf(buff, "%d.%d", neighbor->al_pv, neighbor->al_mv); + snprintf(buff, sizeof buff, "%d.%d", neighbor->al_pv, neighbor->al_mv); *var_len = strlen(buff); return (u_char *)buff; } |