From e04c88393360173aaedff659a2fe897781112282 Mon Sep 17 00:00:00 2001 From: rd235 Date: Mon, 23 Jan 2012 12:41:31 +0000 Subject: [PATCH] vdetelweb: bugfix. Wrong computation of msg length (it added some null bytes. This caused Midori to fail) git-svn-id: https://vde.svn.sourceforge.net/svnroot/vde/trunk@538 d37a7db1-d92d-0410-89df-f68f52f87b57 --- vdetelweb/web.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/vdetelweb/web.c b/vdetelweb/web.c index 2ec9a96..7deb096 100644 --- a/vdetelweb/web.c +++ b/vdetelweb/web.c @@ -498,12 +498,12 @@ static void web_create_page(char *path,int fd,int vdefd,char *postdata) if ((tail=strstr(path,".html")) != NULL) *tail=0; if (*path==0 || ((this=vde_findmenu(menuhead,path)) != NULL)) { - lwip_write(fd,okmsg,sizeof(okmsg)); + lwip_write(fd,okmsg,sizeof(okmsg)-1); lwip_printf(fd, "\r\n" "%s %s\r\n", prompt, (*path==0)?"Home Page":path); - lwip_write(fd,css,sizeof(css)); + lwip_write(fd,css,sizeof(css)-1); lwip_printf(fd, "\r\n" "

%s %s

\r\n" @@ -536,7 +536,7 @@ static void web_create_page(char *path,int fd,int vdefd,char *postdata) "
VDE 2.0 WEB MGMT INTERFACE\r\n" "\r\n"); } else - lwip_write(fd,errmsg,sizeof(errmsg)); + lwip_write(fd,errmsg,sizeof(errmsg)-1); } static char authmsg[]= @@ -600,9 +600,9 @@ int web_core(int fn,int fd,int vdefd) } else if (st->linebuf[0]=='\n' || st->linebuf[0]=='\r') { switch (st->status) { case WEB_IDENTIFY: - lwip_write(fd,authmsg,sizeof(authmsg)); + lwip_write(fd,authmsg,sizeof(authmsg)-1); lwip_write(fd,prompt,strlen(prompt)); - lwip_write(fd,authmsg2,sizeof(authmsg2)); + lwip_write(fd,authmsg2,sizeof(authmsg2)-1); return 1; break; case WEB_AUTHORIZED: -- 2.11.4.GIT