Commit 5d953264 authored by rswindell's avatar rswindell
Browse files

Added typecasts to address MSVC10 assertions (in debug builds).

Added comment about stack variable buffer overflow sighting.
parent 65cf415c
......@@ -8,7 +8,7 @@
* @format.tab-size 4 (Plain Text/Source Code File Header) *
* @format.use-tabs true (see http://www.synchro.net/ptsc_hdr.html) *
* *
* Copyright 2011 Rob Swindell - http://www.synchro.net/copyright.html *
* Copyright 2013 Rob Swindell - http://www.synchro.net/copyright.html *
* *
* This program is free software; you can redistribute it and/or *
* modify it under the terms of the GNU General Public License *
......@@ -1924,7 +1924,7 @@ static void unescape(char *p)
dst=p;
for(;*p;p++) {
if(*p=='%' && isxdigit(*(p+1)) && isxdigit(*(p+2))) {
if(*p=='%' && isxdigit((uchar)*(p+1)) && isxdigit((uchar)*(p+2))) {
sprintf(code,"%.2s",p+1);
*(dst++)=(char)strtol(code,NULL,16);
p+=2;
......@@ -2869,7 +2869,7 @@ static BOOL check_request(http_session_t * session)
{
char path[MAX_PATH+1];
char curdir[MAX_PATH+1];
char str[MAX_PATH+1];
char str[MAX_PATH+1]; /* Apr-7-2013: bounds of str can be exceeded, e.g. "s:\sbbs\web\root\http:\vert.synchro.net\todolist.ssjs\todolist.ssjs\todolist.ssjs\todolist.ssjs\todolist.ssjs\todolist.ssjs\todolist.ssjs\todolist.ssjs\todolist.ssjs\todolist.ssjs\todolist.ssjs\todolist.ssjs\todolist.ssjs\todolist.ssjs\todolist.ssjs\webctrl.ini" char [261] */
char last_ch;
char* last_slash;
char* p;
......@@ -4177,7 +4177,7 @@ js_login(JSContext *cx, uintN argc, jsval *arglist)
memset(&user,0,sizeof(user));
if(isdigit(*p))
if(isdigit((uchar)*p))
user.number=atoi(p);
else if(*p)
user.number=matchuser(&scfg,p,FALSE);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment