forked from minhngoc25a/freetype2
[psaux] Fix timeout in old CFF engine.
Reported as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11260 * src/psaux/cffdecode.c (cff_decoder_parse_charstrings) <cff_op_sqrt> [CFF_CONFIG_OPTION_OLD_ENGINE]: Fix potential endless loop.
This commit is contained in:
parent
cc288e383b
commit
5b86f53dd6
12
ChangeLog
12
ChangeLog
|
@ -1,3 +1,15 @@
|
|||
2018-11-06 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
[psaux] Fix timeout in old CFF engine.
|
||||
|
||||
Reported as
|
||||
|
||||
https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=11260
|
||||
|
||||
* src/psaux/cffdecode.c (cff_decoder_parse_charstrings)
|
||||
<cff_op_sqrt> [CFF_CONFIG_OPTION_OLD_ENGINE]: Fix potential endless
|
||||
loop.
|
||||
|
||||
2018-11-04 Alexei Podtelezhnikov <apodtele@gmail.com>
|
||||
|
||||
* src/truetype/ttgxvar.c: Use enum definitions.
|
||||
|
|
|
@ -1748,7 +1748,10 @@
|
|||
case cff_op_sqrt:
|
||||
FT_TRACE4(( " sqrt\n" ));
|
||||
|
||||
if ( args[0] > 0 )
|
||||
/* without upper limit the loop below might not finish */
|
||||
if ( args[0] > 0x7FFFFFFFL )
|
||||
args[0] = 46341;
|
||||
else if ( args[0] > 0 )
|
||||
{
|
||||
FT_Fixed root = args[0];
|
||||
FT_Fixed new_root;
|
||||
|
|
Loading…
Reference in New Issue