[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-commits
Subject:    branches/KDE/3.5/kdebase/kioslave/man
From:       Nicolas Goutte <nicolasg () snafu ! de>
Date:       2005-12-10 15:56:21
Message-ID: 1134230181.694440.1428.nullmailer () svn ! kde ! org
[Download RAW message or body]

SVN commit 487411 by goutte:

Fix off-by-one when trying to find URLs in the text.
CCBUG:117971


 M  +4 -4      man2html.cpp  


--- branches/KDE/3.5/kdebase/kioslave/man/man2html.cpp #487410:487411
@@ -935,12 +935,12 @@
 	    break;
 	}
 	nr=0;
-	if (idtest[0] && idtest[0]<c) idtest[0]=strstr(c+1,"://");
-	if (idtest[1] && idtest[1]<c) idtest[1]=strchr(c+1,'@');
+	if (idtest[0] && idtest[0]<=c) idtest[0]=strstr(c+1,"://");
+	if (idtest[1] && idtest[1]<=c) idtest[1]=strchr(c+1,'@');
 	if (idtest[2] && idtest[2]<c) idtest[2]=strstr(c,"www.");
 	if (idtest[3] && idtest[3]<c) idtest[3]=strstr(c,"ftp.");
-	if (idtest[4] && idtest[4]<c) idtest[4]=strchr(c+1,'(');
-	if (idtest[5] && idtest[5]<c) idtest[5]=strstr(c+1,".h&gt;");
+	if (idtest[4] && idtest[4]<=c) idtest[4]=strchr(c+1,'(');
+	if (idtest[5] && idtest[5]<=c) idtest[5]=strstr(c+1,".h&gt;");
         for (i=0; i<numtests; i++) nr += (idtest[i]!=NULL);
     }
     output_real(c);
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic