* src/bdf/bdflib.c (bdf_add_property_): Add extra protection.

See https://issues.oss-fuzz.com/issues/389972472
    https://issues.oss-fuzz.com/issues/389968131
This commit is contained in:
Alexei Podtelezhnikov 2025-01-15 15:50:12 +00:00
parent a0d86e5650
commit ae11e18cbd
1 changed files with 2 additions and 1 deletions

View File

@ -1085,7 +1085,8 @@
/* First, check whether the property already exists in the font. */
if ( ( propid = ft_hash_str_lookup( name, font->internal ) ) != NULL )
if ( font->props_used &&
( propid = ft_hash_str_lookup( name, font->internal ) ) != NULL )
{
/* The property already exists in the font, so simply replace */
/* the value of the property with the current value. */