Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
Dependents: EvrythngApi Websocket_Ethernet_HelloWorld_W5500 Websocket_Ethernet_W5500 CurrentWeatherData_W5500 ... more
Revision 8:7609a4bd55fd, committed 2014-10-06
- Comitter:
- Bongjun
- Date:
- Mon Oct 06 01:37:10 2014 +0000
- Parent:
- 7:da52bf0e0e5d
- Child:
- 9:dfffa4d6f022
- Commit message:
- Perform Length check here to prevent buffer overrun fixed by Sean Newton (https://developer.mbed.org/users/SeanNewton/)
Changed in this revision
| Socket/UDPSocket.cpp | Show annotated file Show diff for this revision Revisions of this file |
--- a/Socket/UDPSocket.cpp Mon Sep 29 05:03:41 2014 +0000
+++ b/Socket/UDPSocket.cpp Mon Oct 06 01:37:10 2014 +0000
@@ -82,6 +82,12 @@
if (udp_size > (size-sizeof(info))) {
return -1;
}
+ /* Perform Length check here to prevent buffer overrun */
+ /* fixed by Sean Newton (https://developer.mbed.org/users/SeanNewton/) */
+ if (udp_size > length) {
+ //printf("udp_size: %d\n",udp_size);
+ return -1;
+ }
return eth->recv(_sock_fd, buffer, udp_size);
}
WIZ550io
W5500