HTTPD bug fix which is caused by stack overflow.

Dependents:   mbed_controller_demo

Fork of HTTPD by Suga koubou

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;

History

Fix critical bug cause by accessing buffer with index of out of range.; Set reasonable stack size for server task. default tip

2015-04-10, by hillkim7 [Fri, 10 Apr 2015 09:04:38 +0000] rev 2

Fix critical bug cause by accessing buffer with index of out of range.; Set reasonable stack size for server task.


Fix the HardFault error in HTTPD because of stack overflow.

2015-03-20, by hillkim7 [Fri, 20 Mar 2015 12:08:16 +0000] rev 1

Fix the HardFault error in HTTPD because of stack overflow.


1st build;

2013-11-13, by okini3939 [Wed, 13 Nov 2013 01:58:04 +0000] rev 0

1st build;