summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorDane Springmeyer <dane@mapbox.com>2015-05-08 14:52:33 -0700
committerDane Springmeyer <dane@mapbox.com>2015-05-08 14:52:33 -0700
commit04c73e5ae13a1cc223e3be817d1c4220457aff25 (patch)
tree8fe0f1affdfc6bf1b1db2e723ba6cbecb576c6f7 /src
parent5ef362bbc45e7b553f5d21a5368e09dd243a8a0c (diff)
downloadqtlocation-mapboxgl-04c73e5ae13a1cc223e3be817d1c4220457aff25.tar.gz
fix integer overflow in line_atlas
Diffstat (limited to 'src')
-rw-r--r--src/mbgl/geometry/line_atlas.cpp2
-rw-r--r--src/mbgl/geometry/line_atlas.hpp2
2 files changed, 2 insertions, 2 deletions
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<bool> dirty;
uint32_t texture = 0;
int nextRow = 0;