SF.net SVN: geany:[5175] branches/Geany-0_19_1

ntrel at users.sourceforge.net ntrel at xxxxx
Tue Aug 17 14:52:29 UTC 2010


Revision: 5175
          http://geany.svn.sourceforge.net/geany/?rev=5175&view=rev
Author:   ntrel
Date:     2010-08-17 14:52:29 +0000 (Tue, 17 Aug 2010)

Log Message:
-----------
r5168 | ntrel | 2010-08-16 13:32:18 +0100 (Mon, 16 Aug 2010) | 4 lines

Fix infinite loop in Markdown lexer (patch by Colomban Wendling,
thanks).

Modified Paths:
--------------
    branches/Geany-0_19_1/ChangeLog
    branches/Geany-0_19_1/scintilla/LexMarkdown.cxx

Modified: branches/Geany-0_19_1/ChangeLog
===================================================================
--- branches/Geany-0_19_1/ChangeLog	2010-08-17 14:07:58 UTC (rev 5174)
+++ branches/Geany-0_19_1/ChangeLog	2010-08-17 14:52:29 UTC (rev 5175)
@@ -1,3 +1,10 @@
+2010-08-16  Nick Treleaven  <nick(dot)treleaven(at)btinternet(dot)com>
+
+ * scintilla/LexMarkdown.cxx:
+   Fix infinite loop in Markdown lexer (patch by Colomban Wendling,
+   thanks).
+
+
 2010-08-15  Enrico Tröger  <enrico(dot)troeger(at)uvena(dot)de>
 
  * wscript:

Modified: branches/Geany-0_19_1/scintilla/LexMarkdown.cxx
===================================================================
--- branches/Geany-0_19_1/scintilla/LexMarkdown.cxx	2010-08-17 14:07:58 UTC (rev 5174)
+++ branches/Geany-0_19_1/scintilla/LexMarkdown.cxx	2010-08-17 14:52:29 UTC (rev 5175)
@@ -100,9 +100,9 @@
 static bool HasPrevLineContent(StyleContext &sc) {
     int i = 0;
     // Go back to the previous newline
-    while ((--i + sc.currentPos) && !IsNewline(sc.GetRelative(i))) 
+    while ((--i + (int)sc.currentPos) >= 0 && !IsNewline(sc.GetRelative(i)))
         ;
-    while (--i + sc.currentPos) {
+    while ((--i + (int)sc.currentPos) >= 0) {
         if (IsNewline(sc.GetRelative(i)))
             break;
         if (!IsASpaceOrTab(sc.GetRelative(i)))


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the Commits mailing list