From d255bd6711955192f98bed8bf0b98872dab7fca6 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Fri, 7 Apr 2017 18:10:12 -0400 Subject: Effectively updated to Scintilla 3.7.4 with select backports to 3.7.3. Scintilla 3.7.4 requires a C++11 compiler, which I do not have. --- src/scintilla_backports/6131_a78e38849624.patch | 56 +++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 src/scintilla_backports/6131_a78e38849624.patch (limited to 'src/scintilla_backports/6131_a78e38849624.patch') diff --git a/src/scintilla_backports/6131_a78e38849624.patch b/src/scintilla_backports/6131_a78e38849624.patch new file mode 100644 index 00000000..9fb0f43d --- /dev/null +++ b/src/scintilla_backports/6131_a78e38849624.patch @@ -0,0 +1,56 @@ +# HG changeset patch +# User Neil +# Date 1489619799 -39600 +# Node ID a78e38849624fca65cd615da3f976d22db03a48b +# Parent e8364d5495d60b675717c68f97cc527ab3fc95ee +Fix use-after-free in fold tags when top line folded then new top line inserted. +In SparseVector, string inserted at start then NULL inserted at start. + +diff -r e8364d5495d6 -r a78e38849624 doc/ScintillaHistory.html +--- a/doc/ScintillaHistory.html Sat Mar 11 10:41:32 2017 +1100 ++++ b/doc/ScintillaHistory.html Thu Mar 16 10:16:39 2017 +1100 +@@ -555,6 +555,9 @@ + For IMEs, do not clear selected text when there is no composition text to show. + +
  • ++ Fix to crash with fold tags where line inserted at start. ++
  • ++
  • + Fix to stream selection mode when moving caret up or down. + Bug #1905. +
  • +diff -r e8364d5495d6 -r a78e38849624 src/SparseVector.h +--- a/src/SparseVector.h Sat Mar 11 10:41:32 2017 +1100 ++++ b/src/SparseVector.h Thu Mar 16 10:16:39 2017 +1100 +@@ -100,7 +100,8 @@ + if (partition == 0) { + // Inserting at start of document so ensure 0 + if (valueCurrent != T()) { +- ClearValue(0); ++ // Since valueCurrent is needed again, should not ClearValue ++ values->SetValueAt(0, T()); + starts->InsertPartition(1, 0); + values->InsertValue(1, 1, valueCurrent); + starts->InsertText(0, insertLength); +diff -r e8364d5495d6 -r a78e38849624 test/unit/testSparseVector.cxx +--- a/test/unit/testSparseVector.cxx Sat Mar 11 10:41:32 2017 +1100 ++++ b/test/unit/testSparseVector.cxx Thu Mar 16 10:16:39 2017 +1100 +@@ -89,6 +89,18 @@ + st.Check(); + } + ++ SECTION("InsertStringAtStartThenInsertSpaceAtStart") { ++ REQUIRE(1 == st.Elements()); ++ st.InsertSpace(0, 5); ++ st.SetValueAt(0, "3"); ++ REQUIRE(1 == st.Elements()); ++ REQUIRE("3----" == Representation(st)); ++ st.InsertSpace(0, 1); ++ REQUIRE(2 == st.Elements()); ++ REQUIRE("-3----" == Representation(st)); ++ st.Check(); ++ } ++ + SECTION("InsertAndDeleteAtEnd") { + REQUIRE(1 == st.Elements()); + st.InsertSpace(0, 5); -- cgit v1.2.3