Skip to content
Permalink
Browse files Browse the repository at this point in the history
SWFShape_setLeftFillStyle: prevent fill overflow
  • Loading branch information
Yoha-test authored and strk committed Jul 12, 2020
1 parent 5009802 commit 6e76e8c
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/blocks/shape.c
Expand Up @@ -1169,6 +1169,11 @@ SWFShape_setLeftFillStyle(SWFShape shape, SWFFillStyle fill)
return;
idx = getFillIdx(shape, fill);
}
else if (idx >= 255 && shape->useVersion == SWF_SHAPE1)
{
SWF_error("Too many fills for SWFShape V1.\n"
"Use a higher SWFShape version\n");
}

record = addStyleRecord(shape);
record.record.stateChange->leftFill = idx;
Expand Down

0 comments on commit 6e76e8c

Please sign in to comment.