#1907 "##" in file filter pattern causes an infinite loop

Branch_+_Trunk
closed-fixed
None
5
2014-12-07
2009-05-09
No

2.13.6 and 2.12.2

To reproduce:
1. Install attached file filter.
2. Restart WinMerge.

Fix:
Index: FileFilterMgr.cpp
===================================================================
--- FileFilterMgr.cpp (revision 6720)
+++ FileFilterMgr.cpp (working copy)
@@ -191,7 +191,7 @@

// Find possible comment-separator '<whitespace>\#\#'
while \(pos > 0 && \!\_istspace\(str\[pos - 1\]\)\)

- pos = str.Find(commentLeader, pos);
+ pos = str.Find(commentLeader, pos + 1);

// Remove comment and whitespaces before it
if \(pos > 0\)

Discussion

  • Takashi Sawanaka

     
  • Kimmo Varis

    Kimmo Varis - 2009-05-09

    Oh, good catch!

    Please commit to 2.12 branch too.

     
  • Takashi Sawanaka

    Committed to SVN trunk. Completed: At revision: 6721
    Committed to 2.12 branch. Completed: At revision: 6722

     
  • Takashi Sawanaka

    • assigned_to: nobody --> sdottaka
    • status: open --> closed-fixed
     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks