restore extra slot in sentinal array that was removed in 3825. This extra value
is read, but not acted-upon, by spanRec.init(), and so we need to have a valid address/slot allocated. Caught by the remoting_unittests in chrome run using ASAN. Review URL: https://codereview.appspot.com/6176045 git-svn-id: http://skia.googlecode.com/svn/trunk@3830 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
parent
58b8d4a7a8
commit
5f7c8a55ee
@ -811,7 +811,13 @@ static int operate(const SkRegion::RunType a_runs[],
|
||||
const SkRegion::RunType gEmptyScanline[] = {
|
||||
0, // dummy bottom value
|
||||
0, // zero intervals
|
||||
SkRegion::kRunTypeSentinel
|
||||
SkRegion::kRunTypeSentinel,
|
||||
// just need a 2nd value, since spanRec.init() reads 2 values, even
|
||||
// though if the first value is the sentinel, it ignores the 2nd value.
|
||||
// w/o the 2nd value here, we might read uninitialized memory.
|
||||
// This happens when we are using gSentinel, which is pointing at
|
||||
// our sentinel value.
|
||||
0
|
||||
};
|
||||
const SkRegion::RunType* const gSentinel = &gEmptyScanline[2];
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user