Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug fix in module_webserver.c #5

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions module_webserver/src/web_server.c
Original file line number Diff line number Diff line change
Expand Up @@ -428,6 +428,15 @@ static void prepare_data(chanend c_flash, connection_state_t *st)
while (!finished) {
switch (*src) {
case 255: {
/********************************************************************************
int dyn_expr_id = *(src+1); But *(src+1) is out of the buffers range
if src points to the last buffer entry! In this case just skip the expression
for this time. This expression is handled first with the next iteration.
********************************************************************************/
if(src == eod-1){
finished = 1;
break;
}
int dyn_expr_id = *(src+1);
char buf[WEB_SERVER_SEND_BUF_SIZE];
int dyn_expr_len = web_server_dyn_expr(dyn_expr_id, buf,
Expand Down