diff --git a/sys/lib/libsa/ether_sprintf.c b/sys/lib/libsa/ether_sprintf.c index ae1fe92a34c0..3a80b6f5e14e 100644 --- a/sys/lib/libsa/ether_sprintf.c +++ b/sys/lib/libsa/ether_sprintf.c @@ -1,4 +1,4 @@ -/* $NetBSD: ether_sprintf.c,v 1.6 2007/11/24 13:20:55 isaki Exp $ */ +/* $NetBSD: ether_sprintf.c,v 1.7 2014/03/29 14:20:14 jakllsch Exp $ */ /* * Copyright (c) 1992 Regents of the University of California. @@ -47,8 +47,7 @@ #include #endif -#include -#include +#include #include "stand.h" #include "net.h" @@ -60,10 +59,10 @@ char * ether_sprintf(const u_char *ap) { int i; - static char etherbuf[18]; + static char etherbuf[3*ETHER_ADDR_LEN]; char *cp = etherbuf; - for (i = 0; i < 6; i++) { + for (i = 0; i < ETHER_ADDR_LEN; i++) { *cp++ = hexdigits[*ap >> 4]; *cp++ = hexdigits[*ap++ & 0xf]; *cp++ = ':';