diff src/scanner.cpp @ 9:8c65411cd7ab

integration work on url scanner
author carl
date Thu, 22 Apr 2004 14:00:02 -0700
parents dbe18921f741
children 2c206836b4cc
line wrap: on
line diff
--- a/src/scanner.cpp	Thu Apr 22 11:25:45 2004 -0700
+++ b/src/scanner.cpp	Thu Apr 22 14:00:02 2004 -0700
@@ -843,7 +843,7 @@
     for (int i=0; i<len; i++) {
         u_char c = buf[i];
         // guard against buffer overflow
-        if (count == PENDING_LIMIT-1) {
+        if (count == (PENDING_LIMIT-1)) {
             if (next) next->push(pending, count);
             count = 0;
             st    = init;
@@ -862,10 +862,12 @@
                 } break;
 
             case u_reco: {
+                if (count > 12) {
                 pending[count-1] = 0;
                 if (strncasecmp((const char *)pending, "http://", 7) == 0) {
                     urls->insert(strdup((const char *)pending+7));
                 }
+                }
                 }   // fall thru
 
             case u_init: {