[cff] Sanitize `initialRandomSeed'.
* src/cff/cffload.c (cff_load_private_dict): Make `initial_random_seed' value always positive.
This commit is contained in:
parent
753e1131ee
commit
156b30b1aa
@ -1,3 +1,10 @@
|
||||
2017-02-20 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
[cff] Sanitize `initialRandomSeed'.
|
||||
|
||||
* src/cff/cffload.c (cff_load_private_dict): Make
|
||||
`initial_random_seed' value always positive.
|
||||
|
||||
2017-02-20 Werner Lemberg <wl@gnu.org>
|
||||
|
||||
[cff] Introduce `random-seed' property (2/2).
|
||||
|
@ -1913,6 +1913,13 @@
|
||||
/* ensure that `num_blue_values' is even */
|
||||
priv->num_blue_values &= ~1;
|
||||
|
||||
/* sanitize `initialRandomSeed' to be a positive value, if necessary; */
|
||||
/* this is not mandated by the specification but by our implementation */
|
||||
if ( priv->initial_random_seed < 0 )
|
||||
priv->initial_random_seed = -priv->initial_random_seed;
|
||||
else if ( priv->initial_random_seed == 0 )
|
||||
priv->initial_random_seed = 987654321;
|
||||
|
||||
Exit:
|
||||
/* clean up */
|
||||
cff_blend_clear( subfont ); /* clear blend stack */
|
||||
|
Loading…
Reference in New Issue
Block a user