diff options
author | Guy Harris <guy@alum.mit.edu> | 2001-06-15 07:36:31 +0000 |
---|---|---|
committer | Guy Harris <guy@alum.mit.edu> | 2001-06-15 07:36:31 +0000 |
commit | e035695ede4a88d2847a7a218c7a1268c4a90a19 (patch) | |
tree | 6b82d329a74baa5fed36f6d6020a2d4e6b2adcc6 /packet-bgp.c | |
parent | cb1260ab9f79a011f376745d448091eecb5392d2 (diff) | |
download | wireshark-e035695ede4a88d2847a7a218c7a1268c4a90a19.tar.gz wireshark-e035695ede4a88d2847a7a218c7a1268c4a90a19.tar.bz2 wireshark-e035695ede4a88d2847a7a218c7a1268c4a90a19.zip |
If "buf" is a "char *", "sizeof(buf)" evaluates to the size of a
"char *" variable, not to the size of the buffer to which it points.
svn path=/trunk/; revision=3552
Diffstat (limited to 'packet-bgp.c')
-rw-r--r-- | packet-bgp.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/packet-bgp.c b/packet-bgp.c index d0f0a758a5..685ab64c10 100644 --- a/packet-bgp.c +++ b/packet-bgp.c @@ -2,7 +2,7 @@ * Routines for BGP packet dissection. * Copyright 1999, Jun-ichiro itojun Hagino <itojun@itojun.org> * - * $Id: packet-bgp.c,v 1.38 2001/06/10 02:08:09 guy Exp $ + * $Id: packet-bgp.c,v 1.39 2001/06/15 07:36:31 guy Exp $ * * Supports: * RFC1771 A Border Gateway Protocol 4 (BGP-4) @@ -362,7 +362,7 @@ mp_addr_to_str (guint16 afi, guint8 safi, tvbuff_t *tvb, gint offset, char *buf, case AFNUM_INET6: length = 16 ; tvb_memcpy(tvb, ip6addr.u6_addr.u6_addr8,offset, sizeof(ip6addr)); - snprintf(buf, sizeof(buf), "%s", ip6_to_str(&ip6addr)); + snprintf(buf, buflen, "%s", ip6_to_str(&ip6addr)); break; default: length = 0 ; |