HTTPD bug fix which is caused by stack overflow.
Dependents: mbed_controller_demo
Fork of HTTPD by
Original HTTPD implementation of Suga koubou is great but has some bug inside unfortunately. The most critical bug was accessing buffer with the index of out of range like following.
problematic code
char buf[256]; n = httpd->_state[id].client->receive(buf, sizeof(buf)); buf[n] =0;
With above code, it could set buf[256] = 0 when more that 255 data is received. Setting buf[256] causes some other area of memory is corrupted so that system can be predictive status since than.
bug fixed code
n = httpd->_state[id].client->receive(buf, sizeof(buf)-1); buf[n] =0;
Changes
Revision | Date | Who | Commit message |
---|---|---|---|
2:584ce0a1a76e | 2015-04-10 | hillkim7 | Fix critical bug cause by accessing buffer with index of out of range.; Set reasonable stack size for server task. |
1:a4c4bd58dd3b | 2015-03-20 | hillkim7 | Fix the HardFault error in HTTPD because of stack overflow. |
0:d18dff347122 | 2013-11-13 | okini3939 | 1st build; |