aboutsummaryrefslogtreecommitdiffstats
path: root/Demos/Device/ClassDriver/RNDISEthernet/Lib/DHCP.c
diff options
context:
space:
mode:
authorDean Camera <dean@fourwalledcubicle.com>2014-08-31 20:14:48 +1000
committerDean Camera <dean@fourwalledcubicle.com>2014-08-31 20:14:48 +1000
commit0e68abcd4f0e2d015538e6fce2519c9513fb90ec (patch)
treeac8a76ecb9bd9439073430213bfdfc3cbdd3dabf /Demos/Device/ClassDriver/RNDISEthernet/Lib/DHCP.c
parent2db71bc8a48a042d49a63b27723d9bcb27a35542 (diff)
downloadlufa-0e68abcd4f0e2d015538e6fce2519c9513fb90ec.tar.gz
lufa-0e68abcd4f0e2d015538e6fce2519c9513fb90ec.tar.bz2
lufa-0e68abcd4f0e2d015538e6fce2519c9513fb90ec.zip
Fix overflow for RNDIS class driver responses when returning the adapter query list (thanks to Peter Mc Shane).
Diffstat (limited to 'Demos/Device/ClassDriver/RNDISEthernet/Lib/DHCP.c')
-rw-r--r--Demos/Device/ClassDriver/RNDISEthernet/Lib/DHCP.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/Demos/Device/ClassDriver/RNDISEthernet/Lib/DHCP.c b/Demos/Device/ClassDriver/RNDISEthernet/Lib/DHCP.c
index a72a6ce3f..b3b5d6943 100644
--- a/Demos/Device/ClassDriver/RNDISEthernet/Lib/DHCP.c
+++ b/Demos/Device/ClassDriver/RNDISEthernet/Lib/DHCP.c
@@ -54,8 +54,8 @@ int16_t DHCP_ProcessDHCPPacket(void* IPHeaderInStart,
DHCP_Header_t* DHCPHeaderIN = (DHCP_Header_t*)DHCPHeaderInStart;
DHCP_Header_t* DHCPHeaderOUT = (DHCP_Header_t*)DHCPHeaderOutStart;
- uint8_t* DHCPOptionsINStart = (uint8_t*)(DHCPHeaderInStart + sizeof(DHCP_Header_t));
- uint8_t* DHCPOptionsOUTStart = (uint8_t*)(DHCPHeaderOutStart + sizeof(DHCP_Header_t));
+ uint8_t* DHCPOptionsINStart = ((uint8_t*)DHCPHeaderInStart + sizeof(DHCP_Header_t));
+ uint8_t* DHCPOptionsOUTStart = ((uint8_t*)DHCPHeaderOutStart + sizeof(DHCP_Header_t));
DecodeDHCPHeader(DHCPHeaderInStart);