From b9740ab5c756b3f64bf470fd36b211088d9d0988 Mon Sep 17 00:00:00 2001 From: luigi__ Date: Sun, 18 Apr 2010 17:38:21 +0000 Subject: [PATCH] Wifi: fix some silly error in SoftAP_RXHandler. I don't know but that might have caused buffer overflows. --- desmume/src/wifi.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/desmume/src/wifi.cpp b/desmume/src/wifi.cpp index 3c0684b01..81c26950a 100644 --- a/desmume/src/wifi.cpp +++ b/desmume/src/wifi.cpp @@ -2155,7 +2155,7 @@ static void SoftAP_RXHandler(u_char* user, const struct pcap_pkthdr* h, const u_ *(u16*)&wpacket[12+26] = 0x0003; *(u16*)&wpacket[12+28] = 0x0000; *(u16*)&wpacket[12+30] = *(u16*)&data[12]; - memcpy(&wpacket[12+32], &data[14], wpacketLen); + memcpy(&wpacket[12+32], &data[14], h->len-14); SoftAP.seqNum++;