[prev in list] [next in list] [prev in thread] [next in thread]
List: quagga-dev
Subject: [quagga-dev 8013] Re: [PATCH] Out-of-bounds operation in
From: David Lamparter <equinox () diac24 ! net>
Date: 2010-05-31 9:40:54
Message-ID: 1275298854.5516.4.camel () arkology ! n2 ! diac24 ! net
[Download RAW message or body]
Hi Jon,
>
> Function patches outside prefix if exactly on the boundry.
> Mask is 0x00 in those situations, and should not be used.
> If prefixlen was /32, /64, or /96, function would write 0x00 to
> first location outside prefix
>ospf6d/ospf6_proto.c
>@@ -45,7 +45,8 @@ ospf6_prefix_apply_mask (struct ospf6_prefix *op)
> - pnt[index] &= mask;
> + if (mask)
> + pnt[index] &= mask;
> index++;
The original code looks perfectly fine to me. It is supposed to write 0
to everything outside prefix, including the first location.
-David
P.S.: Your mailer is corrupting whitespace, breaking your patches.
_______________________________________________
Quagga-dev mailing list
Quagga-dev@lists.quagga.net
http://lists.quagga.net/mailman/listinfo/quagga-dev
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic