Tk Library Source Code

View Ticket
Login
Ticket UUID: 712951
Title: Potential infinite loop in doctools::cvs::scanLog
Type: Bug Version: None
Submitter: jenglish Created on: 2003-03-31 21:17:14
Subsystem: doctools Assigned To: andreas_kupries
Priority: 5 Medium Severity:
Status: Closed Last Modified: 2003-04-01 05:15:56
Resolution: Fixed Closed By: andreas_kupries
    Closed on: 2003-03-31 22:15:56
Description:
In doctools/cvs.tcl, ~line 63:

while { ! [regexp "(-----*)|(=====*)" $line] } {
    append comment $line "\n"
    incr i
    set line [lindex $text $i]
}

This will fail to terminate if the input doesn't end
with a "-----*" or "=====*" line.  The while loop
controlling clause should also include a test for " ...
&& $i < $n", to account for the possibility of bad
input.
User Comments: andreas_kupries added on 2003-04-01 05:15:56:
Logged In: YES 
user_id=75003

Possibly true. The Wiki mentions that this was a string 
match before and was changed regexp. Better be sure.
Applied change to head now.