Commit bf6be8b0 authored by bjonesbe@adobe.com's avatar bjonesbe@adobe.com

Bound RasterShapeInterval size to int

Everything in the code assumes that the interval size will always fit in
an int. However, to make sure there are no negatives, the
RasterShapeInterval constructor takes an unsigned. This clamps that
value to make sure we can't overflow an int later.

Review URL: https://codereview.chromium.org/313393004

git-svn-id: svn://svn.chromium.org/blink/trunk@175823 bbb929c8-8fbe-4397-9dbb-9b2b20218538
parent 987a6322
...@@ -43,7 +43,7 @@ public: ...@@ -43,7 +43,7 @@ public:
RasterShapeIntervals(unsigned size, int offset = 0) RasterShapeIntervals(unsigned size, int offset = 0)
: m_offset(offset) : m_offset(offset)
{ {
m_intervals.resize(size); m_intervals.resize(clampTo<int>(size));
} }
void initializeBounds(); void initializeBounds();
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment