diff options
author | Chris Hall (GMCH) <chris.hall@highwayman.com> | 2009-12-09 19:56:24 +0000 |
---|---|---|
committer | Chris Hall (GMCH) <chris.hall@highwayman.com> | 2009-12-09 19:56:24 +0000 |
commit | 78cfba33568916dc861b37b771c2a261f67fffdd (patch) | |
tree | e7c25318f5a09905d04fb23447727da1e72a9074 /bgpd/bgp_aspath.c | |
parent | 5e4383cc008567bbb590031b920482e6f3a1dce9 (diff) | |
parent | cc2dd9280c4456586080d1cf4537d26c02fa9a36 (diff) | |
download | quagga-78cfba33568916dc861b37b771c2a261f67fffdd.tar.bz2 quagga-78cfba33568916dc861b37b771c2a261f67fffdd.tar.xz |
Merge remote branch 'quagga/master' of /git/quagga.euro-ix into pthreads
Diffstat (limited to 'bgpd/bgp_aspath.c')
-rw-r--r-- | bgpd/bgp_aspath.c | 7 |
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); |