summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAsheem Mamoowala <asheem.mamoowala@mapbox.com>2018-06-29 18:00:15 -0700
committerAsheem Mamoowala <asheem.mamoowala@mapbox.com>2018-07-16 17:11:03 -0700
commit07b0021ce3f92bdca3821381c026751a17d6565e (patch)
treee9a782a7d54db90567de82e3a6528960e319d617 /src
parent15019425bef4d486d1de068be53649056375bc5e (diff)
downloadqtlocation-mapboxgl-07b0021ce3f92bdca3821381c026751a17d6565e.tar.gz
Add fuzz tests for TileCover and fix out of bounds access crash.
Diffstat (limited to 'src')
-rw-r--r--src/mbgl/util/tile_cover_impl.cpp2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/mbgl/util/tile_cover_impl.cpp b/src/mbgl/util/tile_cover_impl.cpp
index f796cc7bd3..799ff2666a 100644
--- a/src/mbgl/util/tile_cover_impl.cpp
+++ b/src/mbgl/util/tile_cover_impl.cpp
@@ -32,6 +32,8 @@ void start_list_on_local_minimum(PointList& points) {
next_pt++;
if (next_pt == points.end()) { next_pt = std::next(points.begin()); }
}
+ if (pt == points.end())
+ return;
//Re-close linear rings with first_pt = last_pt
if (points.back() == points.front()) {
points.pop_back();