aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYoshinobu Inoue <shin@FreeBSD.org>2000-03-30 07:14:52 +0000
committerYoshinobu Inoue <shin@FreeBSD.org>2000-03-30 07:14:52 +0000
commit80b6b0e639004282e23e6eaf6465ffe37e3ff794 (patch)
tree3f0b0f1a190247dac0aa2f5338374848e81bcafa
parent657ef5b05ae2c2fa95771ba3936688ead7975932 (diff)
Notes
-rw-r--r--sbin/routed/table.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/sbin/routed/table.c b/sbin/routed/table.c
index b7e826e689aa..90176e3149ac 100644
--- a/sbin/routed/table.c
+++ b/sbin/routed/table.c
@@ -617,6 +617,7 @@ ag_check(naddr dst,
}
+#define NAME0_LEN 14
static const char *
rtm_type_name(u_char type)
{
@@ -636,12 +637,12 @@ rtm_type_name(u_char type)
"RTM_DELADDR",
"RTM_IFINFO"
};
- static char name0[10];
+ static char name0[NAME0_LEN];
if (type > sizeof(rtm_types)/sizeof(rtm_types[0])
|| type == 0) {
- sprintf(name0, "RTM type %#x", type);
+ snprintf(name0, NAME0_LEN, "RTM type %#x", type);
return name0;
} else {
return rtm_types[type-1];