Fix mask applied to SkPath::fFillType in readFromMemory to fix fuzzer bug

The fFillType field only needs/uses 2 bits - not all 8

GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2099113004

Review-Url: https://codereview.chromium.org/2099113004
This commit is contained in:
robertphillips 2016-06-28 04:54:54 -07:00 committed by Commit bot
parent f9bd9da14a
commit 7070a3c44b

View File

@ -2058,7 +2058,7 @@ size_t SkPath::readFromMemory(const void* storage, size_t length) {
}
fConvexity = (packed >> kConvexity_SerializationShift) & 0xFF;
fFillType = (packed >> kFillType_SerializationShift) & 0xFF;
fFillType = (packed >> kFillType_SerializationShift) & 0x3;
uint8_t dir = (packed >> kDirection_SerializationShift) & 0x3;
fIsVolatile = (packed >> kIsVolatile_SerializationShift) & 0x1;
SkPathRef* pathRef = SkPathRef::CreateFromBuffer(&buffer);