Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] mrouted: fix bcopy patch oops
@ 2012-05-03 11:46 Gustavo Zacarias
  2012-05-03 19:59 ` Peter Korsgaard
  0 siblings, 1 reply; 2+ messages in thread
From: Gustavo Zacarias @ 2012-05-03 11:46 UTC (permalink / raw)
  To: buildroot

The bcopy patch just changes bcopy for memmove which is incorrect since
bcopy and memmove use reversed src and dest parameters between them.
Oops!

Signed-off-by: Gustavo Zacarias <gustavo@zacarias.com.ar>
---
 package/mrouted/mrouted-3.9.4-bcopy.patch |   15 +++++----------
 1 files changed, 5 insertions(+), 10 deletions(-)

diff --git a/package/mrouted/mrouted-3.9.4-bcopy.patch b/package/mrouted/mrouted-3.9.4-bcopy.patch
index 73f8acc..ea8f6db 100644
--- a/package/mrouted/mrouted-3.9.4-bcopy.patch
+++ b/package/mrouted/mrouted-3.9.4-bcopy.patch
@@ -1,17 +1,12 @@
----
- mtrace.c |    4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-Index: mrouted-3.9.4/mtrace.c
-===================================================================
---- mrouted-3.9.4.orig/mtrace.c
-+++ mrouted-3.9.4/mtrace.c
+diff -Nura mrouted-3.9.4/mtrace.c mrouted-3.9.4-memmove/mtrace.c
+--- mrouted-3.9.4/mtrace.c	2010-11-19 20:53:19.000000000 -0300
++++ mrouted-3.9.4-memmove/mtrace.c	2012-05-03 08:27:33.895422455 -0300
 @@ -556,7 +556,7 @@
  		save->rtime = ((tr.tv_sec + JAN_1970) << 16) +
  		    (tr.tv_usec << 10) / 15625;
  		save->len = len;
 -		bcopy((char *)igmp, (char *)&save->igmp, ipdatalen);
-+		memmove((char *)igmp, (char *)&save->igmp, ipdatalen);
++		memmove((char *)&save->igmp, (char *)igmp, ipdatalen);
  	    }
  	    return recvlen;
  	}
@@ -20,7 +15,7 @@ Index: mrouted-3.9.4/mtrace.c
  	    (tr.tv_usec << 10) / 15625;
  	base.len = len;
 -	bcopy((char *)igmp, (char *)&base.igmp, ipdatalen);
-+	memmove((char *)igmp, (char *)&base.igmp, ipdatalen);
++	memmove((char *)&base.igmp, (char *)igmp, ipdatalen);
  	/*
  	 * If the user specified which traces to monitor,
  	 * only accept traces that correspond to the
-- 
1.7.3.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [Buildroot] [PATCH] mrouted: fix bcopy patch oops
  2012-05-03 11:46 [Buildroot] [PATCH] mrouted: fix bcopy patch oops Gustavo Zacarias
@ 2012-05-03 19:59 ` Peter Korsgaard
  0 siblings, 0 replies; 2+ messages in thread
From: Peter Korsgaard @ 2012-05-03 19:59 UTC (permalink / raw)
  To: buildroot

>>>>> "Gustavo" == Gustavo Zacarias <gustavo@zacarias.com.ar> writes:

 Gustavo> The bcopy patch just changes bcopy for memmove which is
 Gustavo> incorrect since bcopy and memmove use reversed src and dest
 Gustavo> parameters between them.  Oops!

Oops indeed. Seems to have been introduced with the 3.9.4 bump.

Committed, thanks.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-05-03 19:59 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-05-03 11:46 [Buildroot] [PATCH] mrouted: fix bcopy patch oops Gustavo Zacarias
2012-05-03 19:59 ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox