[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
some bad buffer bounds in zebra
From: |
Anil Madhavapeddy |
Subject: |
some bad buffer bounds in zebra |
Date: |
Tue, 15 Apr 2003 23:37:25 +0100 |
User-agent: |
Mutt/1.4.1i |
Noticed these in zebra-0.93a on OpenBSD; the buffer values
provided are incorrect.
-anil
--- lib/sockunion.c.orig Fri Jun 21 21:00:38 2002
+++ lib/sockunion.c Tue Apr 15 22:41:19 2003
@@ -302,16 +302,16 @@ sockunion_log (union sockunion *su)
switch (su->sa.sa_family)
{
case AF_INET:
- snprintf (buf, BUFSIZ, "%s", inet_ntoa (su->sin.sin_addr));
+ snprintf (buf, sizeof buf, "%s", inet_ntoa (su->sin.sin_addr));
break;
#ifdef HAVE_IPV6
case AF_INET6:
- snprintf (buf, BUFSIZ, "%s",
- inet_ntop (AF_INET6, &(su->sin6.sin6_addr), buf, BUFSIZ));
+ snprintf (buf, sizeof buf, "%s",
+ inet_ntop (AF_INET6, &(su->sin6.sin6_addr), buf, sizeof buf));
break;
#endif /* HAVE_IPV6 */
default:
- snprintf (buf, BUFSIZ, "af_unknown %d ", su->sa.sa_family);
+ snprintf (buf, sizeof buf, "af_unknown %d ", su->sa.sa_family);
break;
}
return buf;
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- some bad buffer bounds in zebra,
Anil Madhavapeddy <=