diff mbox

[Maverick] UBUNTU: SAUCE: ndiswrapper: Initialize buffer index and check its value

Message ID 1283978743.2757.684.camel@emiko
State Accepted
Delegated to: Leann Ogasawara
Headers show

Commit Message

Leann Ogasawara Sept. 8, 2010, 8:45 p.m. UTC
Hi All,

Please consider the following patch for Maverick to resolve ndiswrapper
network connection issues.  I've built and posted test kernels and
received positive feedback from the bug reporters/subscribers.

Thanks,
Leann

From 4d04544689a5956c2f603bad1f52f0321b1a31d5 Mon Sep 17 00:00:00 2001
From: Leann Ogasawara <leann.ogasawara@canonical.com>
Date: Wed, 8 Sep 2010 09:13:41 -0700
Subject: [PATCH] UBUNTU: SAUCE: ndiswrapper: Initialize buffer index and check its value

BugLink: http://bugs.launchpad.net/bugs/613796

The following commit propagated a change to ndiswrapper which originated
from upstream to convert multicast list to list_head.

  commit e2fce7c6af6e1bcd2f577304a5200738d076d98f
  Author: Leann Ogasawara <leann.ogasawara@canonical.com>
  Date:   Thu Jun 3 13:34:15 2010 -0700

    UBUNTU: SAUCE: ndiswrapper: convert multicast list to list_head

In making the change we accidentally forgot to carry forward
initialization of a buffer index and properly check its value.  Add this
missing functionality which previously existed.

We should squash this patch with commit e2fce7c6a upon the next rebase.

Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
---
 ubuntu/ndiswrapper/wrapndis.c |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

Comments

Tim Gardner Sept. 8, 2010, 9:53 p.m. UTC | #1
On 09/08/2010 02:45 PM, Leann Ogasawara wrote:
> Hi All,
>
> Please consider the following patch for Maverick to resolve ndiswrapper
> network connection issues.  I've built and posted test kernels and
> received positive feedback from the bug reporters/subscribers.
>
> Thanks,
> Leann
>
>  From 4d04544689a5956c2f603bad1f52f0321b1a31d5 Mon Sep 17 00:00:00 2001
> From: Leann Ogasawara<leann.ogasawara@canonical.com>
> Date: Wed, 8 Sep 2010 09:13:41 -0700
> Subject: [PATCH] UBUNTU: SAUCE: ndiswrapper: Initialize buffer index and check its value
>
> BugLink: http://bugs.launchpad.net/bugs/613796
>
> The following commit propagated a change to ndiswrapper which originated
> from upstream to convert multicast list to list_head.
>
>    commit e2fce7c6af6e1bcd2f577304a5200738d076d98f
>    Author: Leann Ogasawara<leann.ogasawara@canonical.com>
>    Date:   Thu Jun 3 13:34:15 2010 -0700
>
>      UBUNTU: SAUCE: ndiswrapper: convert multicast list to list_head
>
> In making the change we accidentally forgot to carry forward
> initialization of a buffer index and properly check its value.  Add this
> missing functionality which previously existed.
>
> We should squash this patch with commit e2fce7c6a upon the next rebase.
>
> Signed-off-by: Leann Ogasawara<leann.ogasawara@canonical.com>
> ---
>   ubuntu/ndiswrapper/wrapndis.c |    3 +++
>   1 files changed, 3 insertions(+), 0 deletions(-)
>
> diff --git a/ubuntu/ndiswrapper/wrapndis.c b/ubuntu/ndiswrapper/wrapndis.c
> index 2ac89e7..12be7bc 100644
> --- a/ubuntu/ndiswrapper/wrapndis.c
> +++ b/ubuntu/ndiswrapper/wrapndis.c
> @@ -966,7 +966,10 @@ static void set_multicast_list(struct ndis_device *wnd)
>   			WARNING("couldn't allocate memory");
>   			EXIT2(return);
>   		}
> +		i = 0;
>   		netdev_for_each_mc_addr(ha, net_dev) {
> +			if (i>= size)
> +				break;
>   			if (net_dev->addr_len != ETH_ALEN)
>   				continue;
>   			memcpy(buf + i * ETH_ALEN, ha->addr, ETH_ALEN);

Acked-by: Tim Gardner <tim.gardner@canonical.com>
Leann Ogasawara Sept. 10, 2010, 3:40 a.m. UTC | #2
Applied to Maverick linux master.

Thanks,
Leann

On Wed, 2010-09-08 at 13:45 -0700, Leann Ogasawara wrote:
> Hi All,
> 
> Please consider the following patch for Maverick to resolve ndiswrapper
> network connection issues.  I've built and posted test kernels and
> received positive feedback from the bug reporters/subscribers.
> 
> Thanks,
> Leann
> 
> From 4d04544689a5956c2f603bad1f52f0321b1a31d5 Mon Sep 17 00:00:00 2001
> From: Leann Ogasawara <leann.ogasawara@canonical.com>
> Date: Wed, 8 Sep 2010 09:13:41 -0700
> Subject: [PATCH] UBUNTU: SAUCE: ndiswrapper: Initialize buffer index and check its value
> 
> BugLink: http://bugs.launchpad.net/bugs/613796
> 
> The following commit propagated a change to ndiswrapper which originated
> from upstream to convert multicast list to list_head.
> 
>   commit e2fce7c6af6e1bcd2f577304a5200738d076d98f
>   Author: Leann Ogasawara <leann.ogasawara@canonical.com>
>   Date:   Thu Jun 3 13:34:15 2010 -0700
> 
>     UBUNTU: SAUCE: ndiswrapper: convert multicast list to list_head
> 
> In making the change we accidentally forgot to carry forward
> initialization of a buffer index and properly check its value.  Add this
> missing functionality which previously existed.
> 
> We should squash this patch with commit e2fce7c6a upon the next rebase.
> 
> Signed-off-by: Leann Ogasawara <leann.ogasawara@canonical.com>
> ---
>  ubuntu/ndiswrapper/wrapndis.c |    3 +++
>  1 files changed, 3 insertions(+), 0 deletions(-)
> 
> diff --git a/ubuntu/ndiswrapper/wrapndis.c b/ubuntu/ndiswrapper/wrapndis.c
> index 2ac89e7..12be7bc 100644
> --- a/ubuntu/ndiswrapper/wrapndis.c
> +++ b/ubuntu/ndiswrapper/wrapndis.c
> @@ -966,7 +966,10 @@ static void set_multicast_list(struct ndis_device *wnd)
>  			WARNING("couldn't allocate memory");
>  			EXIT2(return);
>  		}
> +		i = 0;
>  		netdev_for_each_mc_addr(ha, net_dev) {
> +			if (i >= size)
> +				break;
>  			if (net_dev->addr_len != ETH_ALEN)
>  				continue;
>  			memcpy(buf + i * ETH_ALEN, ha->addr, ETH_ALEN);
> -- 
> 1.7.1
> 
> 
> 
>
diff mbox

Patch

diff --git a/ubuntu/ndiswrapper/wrapndis.c b/ubuntu/ndiswrapper/wrapndis.c
index 2ac89e7..12be7bc 100644
--- a/ubuntu/ndiswrapper/wrapndis.c
+++ b/ubuntu/ndiswrapper/wrapndis.c
@@ -966,7 +966,10 @@  static void set_multicast_list(struct ndis_device *wnd)
 			WARNING("couldn't allocate memory");
 			EXIT2(return);
 		}
+		i = 0;
 		netdev_for_each_mc_addr(ha, net_dev) {
+			if (i >= size)
+				break;
 			if (net_dev->addr_len != ETH_ALEN)
 				continue;
 			memcpy(buf + i * ETH_ALEN, ha->addr, ETH_ALEN);