From 1aac686670025bc0fd404e28016b5012db61e187 Mon Sep 17 00:00:00 2001 From: Eric Fischer Date: Mon, 2 May 2016 16:18:01 -0700 Subject: [PATCH] Update clipper to 9edc2924e39: commit 9edc2924e39266d70774b0ed0e07329a95e76f10 Author: Blake Thompson Date: Mon May 2 14:45:21 2016 -0400 Updated to prevent segfault in case where specific iterator was being deleted and therefore, the range second no longer existed. --- CHANGELOG.md | 4 ++++ clipper/clipper.cpp | 4 ++-- version.hpp | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 5af5b70..17b6e29 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,7 @@ +## 1.11.2 + +* Update Clipper to fix potential crash + ## 1.11.1 * Make better use of C++ standard libraries diff --git a/clipper/clipper.cpp b/clipper/clipper.cpp index cdc11d0..fa9af6c 100644 --- a/clipper/clipper.cpp +++ b/clipper/clipper.cpp @@ -4643,7 +4643,7 @@ bool Clipper::FindIntersectLoop(std::unordered_multimap & d range = dupeRec.equal_range(idx_search); visited.insert(idx_search); // Check for connection through chain of other intersections - for (auto it = range.first; it != range.second; ++it) + for (auto it = range.first; it != range.second && it != dupeRec.end() && it->first == idx_search; ++it) { OutRec * itRec = GetOutRec(it->second.op2->Idx); if (visited.count(itRec->Idx) > 0 || @@ -4741,7 +4741,7 @@ bool Clipper::FixIntersects(std::unordered_multimap & dupeR std::set visited; visited.insert(outRec_search->Idx); // Check for connection through chain of other intersections - for (auto it = range.first; it != range.second; ++it) + for (auto it = range.first; it != range.second && it != dupeRec.end() && it->first == outRec_search->Idx; ++it) { OutRec * itRec = GetOutRec(it->second.op2->Idx); if (itRec->Idx != outRec_search->Idx && diff --git a/version.hpp b/version.hpp index 692985f..f233b34 100644 --- a/version.hpp +++ b/version.hpp @@ -1 +1 @@ -#define VERSION "tippecanoe v1.11.1\n" +#define VERSION "tippecanoe v1.11.2\n"