From 14d29a10437205566c4bd7bcfa2282d34d9f4f2f Mon Sep 17 00:00:00 2001 From: Michiharu Ariza Date: Wed, 5 Dec 2018 21:33:29 -0800 Subject: [PATCH 1/2] check number of blends against args on stack --- src/hb-cff2-interp-cs.hh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/hb-cff2-interp-cs.hh b/src/hb-cff2-interp-cs.hh index d258b8148..18e846803 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++) From ae087d10c22249f3aec3239e4eac98a728f71f75 Mon Sep 17 00:00:00 2001 From: Michiharu Ariza Date: Wed, 5 Dec 2018 21:47:34 -0800 Subject: [PATCH 2/2] add minimized test case for oss-fuzz issue 11714 --- ...e-minimized-hb-subset-fuzzer-5710107829075968 | Bin 0 -> 3660 bytes 1 file changed, 0 insertions(+), 0 deletions(-) create mode 100644 test/fuzzing/fonts/clusterfuzz-testcase-minimized-hb-subset-fuzzer-5710107829075968 diff --git a/test/fuzzing/fonts/clusterfuzz-testcase-minimized-hb-subset-fuzzer-5710107829075968 b/test/fuzzing/fonts/clusterfuzz-testcase-minimized-hb-subset-fuzzer-5710107829075968 new file mode 100644 index 0000000000000000000000000000000000000000..5fef2f84850835a7450d8e2f77c106cb31713837 GIT binary patch literal 3660 zcmeHJYfMyE5T3is;)<(otq4sTa%-`!79pjT_#l-xQqffxwZv9k-b7)6T~xFdh&9CC zB`YDgB|Z=-Aq^Te*0k0dV;d45KMb{vP1K}nTTN<%Hl+u0mG+x+rP4;5*x&5to-;G& zoA1obnR|AfIXO-mPjzIbrKuSi@kgt_DJKd$N@On2OiRz8=V=Vl1eJ&)GnY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