[subset] fix data race touching Crap() in cff subsetting.
This commit is contained in:
parent
d8d96b26e7
commit
98aaecd397
|
@ -1138,7 +1138,8 @@ struct cff1
|
|||
cff1_top_dict_interp_env_t env (fontDictStr);
|
||||
cff1_font_dict_interpreter_t font_interp (env);
|
||||
font = fontDicts.push ();
|
||||
if (unlikely (font == &Crap (cff1_font_dict_values_t))) { fini (); return; }
|
||||
if (unlikely (fontDicts.in_error ())) { fini (); return; }
|
||||
|
||||
font->init ();
|
||||
if (unlikely (!font_interp.interpret (*font))) { fini (); return; }
|
||||
PRIVDICTVAL *priv = &privateDicts[i];
|
||||
|
|
|
@ -44,7 +44,8 @@ struct str_encoder_t
|
|||
|
||||
void encode_byte (unsigned char b)
|
||||
{
|
||||
if (unlikely (buff.push (b) == &Crap (unsigned char)))
|
||||
buff.push (b);
|
||||
if (unlikely (buff.in_error ()))
|
||||
set_error ();
|
||||
}
|
||||
|
||||
|
|
|
@ -159,7 +159,7 @@ int main(int argc, char** argv)
|
|||
|
||||
if (argc > 4)
|
||||
{
|
||||
num_tests = (argc - 3) / 2;
|
||||
num_tests = argc - 3;
|
||||
tests = (test_input_t *) calloc (num_tests, sizeof (test_input_t));
|
||||
for (unsigned i = 0; i < num_tests; i++)
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue