summaryrefslogtreecommitdiffstats
path: root/bgpd/bgp_aspath.c
diff options
context:
space:
mode:
authorChris Hall (GMCH) <chris.hall@highwayman.com>2009-12-09 20:02:27 +0000
committerChris Hall (GMCH) <chris.hall@highwayman.com>2009-12-09 20:02:27 +0000
commit120e91359392aa18f257cd88e77d762c32eb8a4f (patch)
treee367f821165554a8dced5e8bcba8a9eedfc69778 /bgpd/bgp_aspath.c
parentaa04a120d60b4001bb6224a7efd6d49fec7ec622 (diff)
parentcc2dd9280c4456586080d1cf4537d26c02fa9a36 (diff)
downloadquagga-120e91359392aa18f257cd88e77d762c32eb8a4f.tar.bz2
quagga-120e91359392aa18f257cd88e77d762c32eb8a4f.tar.xz
Merge remote branch 'quagga/master' of /git/quagga.euro-ix
Diffstat (limited to 'bgpd/bgp_aspath.c')
-rw-r--r--bgpd/bgp_aspath.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/bgpd/bgp_aspath.c b/bgpd/bgp_aspath.c
index 440815b4..3c8032f8 100644
--- a/bgpd/bgp_aspath.c
+++ b/bgpd/bgp_aspath.c
@@ -728,8 +728,11 @@ assegments_parse (struct stream *s, size_t length, int use32bit)
if ( ((bytes + seg_size) > length)
/* 1771bis 4.3b: seg length contains one or more */
|| (segh.length == 0)
- /* Paranoia in case someone changes type of segment length */
- || ((sizeof segh.length > 1) && (segh.length > AS_SEGMENT_MAX)) )
+ /* Paranoia in case someone changes type of segment length.
+ * Shift both values by 0x10 to make the comparison operate
+ * on more, than 8 bits (otherwise it's a warning, bug #564).
+ */
+ || ((sizeof segh.length > 1) && (0x10 + segh.length > 0x10 + AS_SEGMENT_MAX)) )
{
if (head)
assegment_free_all (head);