]> git.sur5r.net Git - u-boot/commitdiff
xilinx_emaclite buffer overrun
authorClive Stubbings <uboot@xentech.co.uk>
Mon, 27 Oct 2008 15:05:00 +0000 (15:05 +0000)
committerBen Warren <biggerbadderben@gmail.com>
Mon, 10 Nov 2008 05:38:02 +0000 (21:38 -0800)
Patch to fix buffer allocation size and alignment. Buffer needs to be u32 aligned and
PKTSIZE_ALIGN bytes long.

Acked-by: Michal Simek <monstr@monstr.eu>
Signed-off-by: Ben Warren <biggerbadderben@gmail.com>
drivers/net/xilinx_emaclite.c

index 88cd0f9ff4f4a56e79554ec9add13f4fe2a03238..0e96ef184adc7962e62f219d087fd5abb28fdb04 100644 (file)
@@ -70,7 +70,7 @@ typedef struct {
 
 static xemaclite emaclite;
 
-static char etherrxbuff[PKTSIZE_ALIGN/4]; /* Receive buffer */
+static u32 etherrxbuff[PKTSIZE_ALIGN/4]; /* Receive buffer */
 
 /* hardcoded MAC address for the Xilinx EMAC Core when env is nowhere*/
 #ifdef CONFIG_ENV_IS_NOWHERE