From: Michiharu Ariza Date: Thu, 6 Dec 2018 05:33:29 +0000 (-0800) Subject: check number of blends against args on stack X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=14d29a10437205566c4bd7bcfa2282d34d9f4f2f;p=platform%2Fupstream%2FlibHarfBuzzSharp.git check number of blends against args on stack --- diff --git a/src/hb-cff2-interp-cs.hh b/src/hb-cff2-interp-cs.hh index d258b81..18e8468 100644 --- a/src/hb-cff2-interp-cs.hh +++ b/src/hb-cff2-interp-cs.hh @@ -235,6 +235,11 @@ struct CFF2CSOpSet : CSOpSet 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++)