From 42fc922d44fbcd4b15b89e7e2a877e15b2fbaccd Mon Sep 17 00:00:00 2001 From: deraadt Date: Sun, 12 Jan 2014 11:26:48 +0000 Subject: [PATCH] plen is unsigned --- usr.sbin/tcpdump/print-bgp.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/usr.sbin/tcpdump/print-bgp.c b/usr.sbin/tcpdump/print-bgp.c index a276a00169e..61b86c8ebc0 100644 --- a/usr.sbin/tcpdump/print-bgp.c +++ b/usr.sbin/tcpdump/print-bgp.c @@ -1,4 +1,4 @@ -/* $OpenBSD: print-bgp.c,v 1.15 2012/02/19 17:24:05 claudio Exp $ */ +/* $OpenBSD: print-bgp.c,v 1.16 2014/01/12 11:26:48 deraadt Exp $ */ /* * Copyright (C) 1999 WIDE Project. @@ -358,7 +358,7 @@ decode_prefix4(const u_char *pd, char *buf, u_int buflen) ((u_char *)&addr)[(plen + 7) / 8 - 1] &= ((0xff00 >> (plen % 8)) & 0xff); } - n = snprintf(buf, buflen, "%s/%d", getname((u_char *)&addr), plen); + n = snprintf(buf, buflen, "%s/%u", getname((u_char *)&addr), plen); if (n == -1 || n >= buflen) return -1; @@ -389,7 +389,7 @@ decode_prefix6(const u_char *pd, char *buf, u_int buflen) ((0xff00 >> (plen % 8)) & 0xff); } - n = snprintf(buf, buflen, "%s/%d", getname6((u_char *)&addr), plen); + n = snprintf(buf, buflen, "%s/%u", getname6((u_char *)&addr), plen); if (n == -1 || n >= buflen) return -1; -- 2.20.1