Merge pull request #1458 from harfbuzz/cff-check-blends

[CFF] oss-fuzz issue 11714: set_blends
This commit is contained in:
Ebrahim Byagowi 2018-12-06 10:21:00 +03:30 committed by GitHub
commit 6ad3fcddaf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 0 deletions

View File

@ -235,6 +235,11 @@ struct CFF2CSOpSet : CSOpSet<BlendArg, OPSET, CFF2CSInterpEnv, PARAM, PATH>
env.process_blend ();
k = env.get_region_count ();
n = env.argStack.pop_uint ();
if (unlikely (env.argStack.get_count () < ((k+1) * n)))
{
env.set_error ();
return;
}
/* copy the blend values into blend array of the default values */
unsigned int start = env.argStack.get_count () - ((k+1) * n);
for (unsigned int i = 0; i < n; i++)