--- parser3/src/main/untaint.C 2001/03/12 13:40:27 1.1 +++ parser3/src/main/untaint.C 2001/03/18 13:22:07 1.3 @@ -3,7 +3,7 @@ Copyright (c) 2001 ArtLebedev Group (http://www.artlebedev.com) Author: Alexander Petrosyan (http://design.ru/paf) - $Id: untaint.C,v 1.1 2001/03/12 13:40:27 paf Exp $ + $Id: untaint.C,v 1.3 2001/03/18 13:22:07 paf Exp $ */ #include @@ -16,8 +16,7 @@ #define escape(cases) \ { \ const char *ptr=row->item.ptr; \ - int size=row->item.size; \ - for (;*ptr;ptr++) \ + for (int size=row->item.size; size--; ptr++) \ switch(*ptr) { \ cases \ default: *copy_here++=*ptr; break; \ @@ -35,7 +34,7 @@ // String char *String::cstr() const { - char *result=static_cast(malloc(size()*UNTAINT_TIMES_BIGGER+1)); + char *result=(char *)malloc(size()*UNTAINT_TIMES_BIGGER+1); char *copy_here=result; const Chunk *chunk=&head;