diff options
author | Robin Watts <robin.watts@artifex.com> | 2012-01-06 11:38:43 +0000 |
---|---|---|
committer | Robin Watts <robin@ghostscript.com> | 2012-01-06 13:49:24 +0000 |
commit | 09f1a3d3d863099c103100ed10c8cec82ea7aed3 (patch) | |
tree | e5eaa31b5b2efc0c9e9537649e7e681ed428e8c0 /xps | |
parent | a0203aeba59a207db78a312b9b3aacf97b2802f5 (diff) | |
download | mupdf-09f1a3d3d863099c103100ed10c8cec82ea7aed3.tar.xz |
Add 'marking' functions for dictionaries.
In various places in the code, we add markers (".seen") to
dictionaries as we traverse them to ensure that we don't
go into infinite loops.
Adding a dictionary entry is bad as it's a) an expensive
operation, b) a potentially destructive one, and c) produces another
possible point of failure (as mallocs can fail).
Instead, add a flag to each dict to allow them to be marked/unmarked
and use that instead.
Thanks to Zeniko for pointing out various places that could usefully
be protected against infinite recursion.
Diffstat (limited to 'xps')
0 files changed, 0 insertions, 0 deletions