From 04c73e5ae13a1cc223e3be817d1c4220457aff25 Mon Sep 17 00:00:00 2001 From: Dane Springmeyer Date: Fri, 8 May 2015 14:52:33 -0700 Subject: fix integer overflow in line_atlas --- src/mbgl/geometry/line_atlas.cpp | 2 +- src/mbgl/geometry/line_atlas.hpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/mbgl/geometry/line_atlas.cpp b/src/mbgl/geometry/line_atlas.cpp index 42d2380777..a0bdbc0e57 100644 --- a/src/mbgl/geometry/line_atlas.cpp +++ b/src/mbgl/geometry/line_atlas.cpp @@ -14,7 +14,7 @@ using namespace mbgl; LineAtlas::LineAtlas(uint16_t w, uint16_t h) : width(w), height(h), - data(new char[w * h]), + data(new uint8_t[w * h]), dirty(true) { } diff --git a/src/mbgl/geometry/line_atlas.hpp b/src/mbgl/geometry/line_atlas.hpp index 3683272f98..1ce6f901fc 100644 --- a/src/mbgl/geometry/line_atlas.hpp +++ b/src/mbgl/geometry/line_atlas.hpp @@ -34,7 +34,7 @@ public: private: std::recursive_mutex mtx; - char *const data = nullptr; + uint8_t *const data = nullptr; std::atomic dirty; uint32_t texture = 0; int nextRow = 0; -- cgit v1.2.1