diff --git a/c/cr.c b/c/cr.c index 4395c81..7296572 100755 --- a/c/cr.c +++ b/c/cr.c @@ -247,8 +247,8 @@ int main(int argc, char **argv) int prefixsize = httpswww+httpwww+https+http; char urlnoprefix[urlsize-prefixsize+1]; char urlnopathnoprefix[urlsize-prefixsize+1]; - memset(urlnoprefix,0,urlsize-prefixsize+2); - memset(urlnopathnoprefix,0,urlsize-prefixsize+2); + memset(urlnoprefix,0,urlsize-prefixsize+1); + memset(urlnopathnoprefix,0,urlsize-prefixsize+1); int urlcount=0,urlnoprefixcount=0,urlnopathnoprefix_done=0; //store the url without prefix to urlnoprefix diff --git a/c/htmlparse.h b/c/htmlparse.h index e77d763..bfa7335 100755 --- a/c/htmlparse.h +++ b/c/htmlparse.h @@ -311,7 +311,7 @@ void htmlparse(){ if(urlFound == 0 && urlTagFound == 0 && incomment == 0 && instyle == 0 && inscript == 0 && inlink == 0 && locateInWindow(windowWithSpaces,"=substrLen){ + for(int i=domainLen-substrLen;i