Wiznet / WIZ550S2E

Serial to Ethernet Module based on W5500 & Cortex-M0
https://docs.wiznet.io/Product/S2E-Module/WIZ550S2E
11 stars 10 forks source link

Bootloader bug - out of bounds #23

Open MicroframeDev1 opened 6 years ago

MicroframeDev1 commented 6 years ago

WIZ550S2E->WIZ550S2E_Boot->ConfigData.c

for(i = 0, j = 0 ; i <= 6 ; i++, j += 2) s2e_packet.network_info_common.mac[i] = get_hex(buf[j], buf[j+1]);

When i=6 and j=12, both .mac[i] and buf[j] will go out of bounds. I was alerted by a compiler warning in LPCXpresso 8.2.2.

Does this break the bootloader, or does in field flashing still work? Which version of LPCXpresso are you using for compiles?

MicroframeDev1 commented 6 years ago

I have verified the original bootloader allows updates via TFTP, though sometimes I couldn't get it to start.

I compiled my fixed code with LPCXpresso 7.5.0. I should test that...