summaryrefslogtreecommitdiff
path: root/base/gxtype1.h
Commit message (Collapse)AuthorAgeFilesLines
* Update postal address in file headersChris Liddell2023-04-041-3/+3
|
* oss-fuzz 50326: Fix and use bounds checkChris Liddell2022-08-191-2/+2
| | | | | | for Type 1/2 charstring executaion state stack. The bounds checking macro was incorrect, and wasn't being used in the minimal CharString interpreter used by pdfwrite and co.
* Update copyright to 2021Chris Liddell2021-03-151-1/+1
|
* Update copyright to 2020Chris Liddell2020-04-101-1/+1
|
* Update source/header file copyright notice to 2019Chris Liddell2019-01-161-1/+1
|
* Remove some blah_DEFINED cruft.Robin Watts2019-01-071-10/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now we properly "include what we use" let's sanitise the horrid blah_DEFINED ifdeffery (i.e. kill it where possible). Also, we update the .c dependencies in the base/psi makefiles to be correct. Unfortunately, this new correct set of dependencies causes nmake to soil itself and die with an out of memory error. After much experimentation, I've come to the conclusion that this is because it copes poorly with given the same file as a dependency multiple times. Sadly, our style of declaring dependencies in the following style: foo_h=$(BLAH)/foo.h $(std_h) bar_h=$(BLAH)/bar.h $(foo_h) $(std_h) baz_h=$(BLAH)/baz.h $(foo_h) $(std_h) means that a .obj file that depends on $(foo_h) $(bar_h) and $(baz_h) ends up depending on foo.h twice, and std.h three times. I have therefore changed the style of dependencies used to be more standard. We still define: foo_h=$(BLAH)/foo.h so each .obj file rule can depend on $(foo_h) etc as required, but the dependencies between each .h file are expressed in normal rules at the end of the file in a dedicated "# Dependencies" section that we can now autogenerate.
* Fix header inclusions.Robin Watts2018-12-141-0/+1
| | | | | | | | | | | | | | Run a release build on a linux machine to make arch.h etc. Then run toolbin/headercompile.pl to test compiling each headerfile by itself. Resolve all the missing #includes, add missing repeated include guards and copyright statements. Also, update all the header dependencies in the makefiles. It is possible that the object dependencies in the makefiles can be simplified now, but that's a task for another day.
* Add more bounds checking to type 2 font interpreterKen Sharp2018-02-191-0/+4
| | | | | | | | | Bug #699042 "stack out of bounds read in gs_type2_interpret, gstype2.c line 701" The warning is caused by 'csp' being below the cstack bottom bound. Adding a check for that prevents this warning. While we're here, add checks to the bounds of 'transient_array' which wasn't being checked previously.
* pdfwrite - improve stack bounds checking on font interpretersKen Sharp2018-02-141-0/+6
| | | | | | | | | | | | | | | Bug #699020 "stack buffer underflow (read) in gs_type2_interpret / gstype2.c line 567" The internal type 1 and type 2 font interpreters are only used by the vector devices (in particular pdfwrite), for rendering we use FreeType. This commit improves the bounds checking of the operand stacks used by these interpreters, to catch more cases of badly formed or corrupted fonts and throw an error in these cases. This addresses the stated bug, but should actually prevent a lot more problems which we haven't yet seen test cases for.
* Bug 699016: add stack bounds check for Type 1 seacChris Liddell2018-02-131-0/+3
| | | | | | The macro for checking the stack bounds is now called from both the Type 1 and Type 2 charstring code, so move it to a common header, and tweak the name to fit.
* Update copyright notice with new head office address.Ken Sharp2018-01-301-3/+3
| | | | | | | | | Also update copyright dates. Remove gs_cmdl.ps as we no longer use it, and remove its entry from psfiles.htm. Remove xfonts.htm as this feature (xfont support) is long, long gone.
* Bug 694269: valgrind issues in Type 1 charstring interpreterChris Liddell2017-02-211-0/+1
| | | | | | | | | | | | 1) Bounds check the charstring data so we don't run off the end of the buffer 2) Initialise various entries in the Type 1 hinter state: in a well formed font these will never be used without being set from the charstring, but in a broken font, they can be used without being set. 3) Initialise the (sacrificial) path we use when retrieving glyph metrics etc. 4) Initialise the contents of the stack
* Make gs_imager_state == gs_state.Chris Liddell2016-06-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change how gstate initialisation is done: Previously we relied on the imager state being a subset of the gstate (thus assigning an imager state to a graphics state over wrote to the entries common to both, and didn't overwrite any already set graphics state specific entries). Making the imager and graphics states the same means that approach doesn't work, so this changes it to initialise the entries individually. Renames gsistate.c->gsgstate.c and gxistate.h->gxgstate.h Cleanup and fix the gs_state gc stuff. Uses different check for pre/post clist pdf14 device Previously, the code used "is_gstate" in the imager/graphics state object to determine if the code was being called pre or post clist (post clist would only ever have had an imager_state so is_gstate = false). With no imager state any more, that test would no longer work (and I am dubious about whether it was really safe, anyway). Other places check for the presence of a clist reader device in the pdf14 device structure - so use that here too. Adds initial (NULL) value for show_gstate pointer in gs_state. Removes the now pointless macro for the contents of the graphics state Changes function names that had "imager" to use "gstate" Removes the redundant 'is_state' flag Cleans up gs_(g)state_putdeviceparams(): Previously we had to similar routines: one took a graphics state, and used the device from the graphics state, the other took an imager state and the device as an explicit parameter. With the removal of the imager state, "merge" those two functions Replaces gs_state with gs_gstate It makes for less confusion as it really is a g(raphics)state
* Remove legacy lower case arch_* macrosChris Liddell2016-01-111-1/+1
| | | | | Most of the ARCH_* macros had lower case equivalents for "backwards compatibility" - it's been long enough.....
* Bug 694147: add stack checks in Type 1 charstringsChris Liddell2015-10-231-0/+13
| | | | | | | Add checks for the both the operand stack and the 'control' stack during interpreting of Type 1 charstrings. No cluster differences
* Commit of build_consolidation branchChris Liddell2015-07-201-0/+263
Squashed into one commit (see branch for details of the evolution of the branch). This brings gpcl6 and gxps into the Ghostscript build system, and a shared set of graphics library object files for all the interpreters. Also, brings the same configuration options to the pcl and xps products as we have for Ghostscript.