Cedric Fontaine wrote: > > I can't figure out why it hangs always on the same file while indexing my > whole website (on this page : > http://www.sincever.com/banv2.php ) > I found some bugs. This patch fixes hanging. Thanks for reporting!
Index: parsehtml.c
===================================================================
RCS file: /usr/src/CVS/mnogosearch32/src/parsehtml.c,v
retrieving revision 1.38
diff -u -r1.38 parsehtml.c
--- parsehtml.c 2001/09/25 10:03:04 1.38
+++ parsehtml.c 2001/09/26 10:40:23
@@ -52,7 +52,8 @@
/* Skip leading spaces */
- while(strchr(" \t\r\n",*b))b++;
+ while((*b)&&strchr(" \t\r\n",*b))b++;
+
if(*b=='>'){
*lt=b+1;
return(s);
@@ -83,7 +84,7 @@
}
/* Skip spaces */
- while(strchr(" \t\r\n",*e))e++;
+ while((*e)&&strchr(" \t\r\n",*e))e++;
if(*e!='='){
b=e;
@@ -91,7 +92,7 @@
}
/* Skip spaces */
- for(b=e+1;strchr(" \r\n\t",*b);b++);
+ for(b=e+1;(*b)&&strchr(" \r\n\t",*b);b++);
if(*b=='"'){
b++;
@@ -114,11 +115,12 @@
if(*b=='\'')b++;
}else{
valbeg=b;
- for(e=b;(*e)&&!strchr(" \t\r\n",*e);e++);
+ for(e=b;(*e)&&!strchr(" >\t\r\n",*e);e++);
valend=e;
b=e;
}
+ *lt=b;
t->toks[nt].val=valbeg;
t->toks[nt].vlen=valend-valbeg;
}
