summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Doc and date revisions for 9.52.1 release.ghostpdl-9.52.1gs9.52.1Chris Liddell2020-07-2943-46/+73
|
* Bug 702582, CVE 2020-15900 Memory Corruption in Ghostscript 9.52Ray Johnston2020-07-291-6/+11
| | | | | | | | | | | Fix the 'rsearch' calculation for the 'post' size to give the correct size. Previous calculation would result in a size that was too large, and could underflow to max uint32_t. Also fix 'rsearch' to return the correct 'pre' string with empty string match. A future change may 'undefine' this undocumented, non-standard operator during initialization as we do with the many other non-standard internal PostScript operators and procedures.
* Version, dates etc for 9.52 releaseghostscript-9.52ghostpdl-9.52Chris Liddell2020-03-1943-59/+59
|
* Release notes for 9.52 releaseChris Liddell2020-03-193-38/+142
|
* Add references to the 64 bit windows exesChris Liddell2020-03-171-7/+13
|
* Bug 702217: Reinstate dynamic libs LDFLAGS for MacOSChris Liddell2020-03-161-1/+1
| | | | | | With the significant revamp of the platform detection functions in configure the LDFLAGS for building the gs shared library on MacOS went astray. This puts them back in.
* Repair device subclassing after fill+stroke commitKen Sharp2020-03-162-2/+13
| | | | | | | | | | | | | | | Bug 702221 "Ghostscript 9.51 - SIGFPE when -dFirstPage or -dLastPage is set" The fill+stroke commit had an error with the default method for handling fill_stroke_path which passed the subclassing device as a parameter to the child, instead of passing the child device. This caused seg faults, floating point exceptions, hangs, and possibly other problems. In addition the object filtering device had been modified to pass the fill+stroke method to the default handler, instead of checking to see if vector operations should be dropped. This commit fixes both problems.
* Add ARCH_MAX_SIZE_T to configure's arch.h prototypeChris Liddell2020-03-161-0/+1
|
* Don't fail on missing freetype for auxtools runChris Liddell2020-03-161-1/+3
| | | | | When cross compiling, we shouldn't fail the recursive call to configure if there's no freetype - since it's not required for auxtools.
* Dates, changelog etc for 9.51 releaseghostscript-9.51ghostpdl-9.51gs9.51Chris Liddell2020-03-1244-47/+66
|
* Fix 16bit blending problem.Robin Watts2020-03-101-7/+9
| | | | | | | | | Seen with: gs -sDEVICE=psdcmyk16 -o out%d.psd -r72 -dMaxBitmap=2000M tests_private/pdf/forms/v1.5/proxy_vol_1_number_1_1.pdf on page 3.
* Dates/logs for 9.51 release candidate 3ghostpdl-9.51rc3Chris Liddell2020-03-0242-45/+76
|
* Fix 64bit non-console windows build.Robin Watts2020-03-021-2/+2
| | | | | | | | The creation of the text window was truncating the pointer to long (32bit) size. No idea how we've been getting away with this in the past. I can only assume this has been exposed by differences in the runtime lib with vs2019 as compared to earlier versions.
* Add mention of deprecating/removing opvp/oprp devicesChris Liddell2020-03-022-0/+18
|
* Dates, changelog etc for 9.51rc2ghostpdl-9.51rc2Chris Liddell2020-02-2844-107/+1274
|
* Fix signed issue in 16bit alpha blending fill_rectangle routines.ghostpdl-9.51rc2_test2Robin Watts2020-02-271-5/+6
| | | | | | | As seen by the central spot in the pink region of page 1 of: gs -sDEVICE=psdcmyk16 -o out%d.psd -dMaxBitmap=2000M tests_private/pdf/pdf_1.7_ATS_EXXPA1DC_PDFACT.pdf
* pdfwrite - Fix indeterminism with QL shading testsKen Sharp2020-02-271-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | When creating a new colour space to put in a PDF file we perform various tests to see if its a space we have already written, to prevent writing duplicate spaces (we perform similar tests for most resources). In some cases, when we write the resource to a file, we create an MD5 hash and compare those to see if the resources are the same. In the case of colour spaces, however, they are retained in memory and so we use a different method. We 'serialise' the colour space. This is not the same as writing it to the PDF file, and its a graphics library thing not a pdfwrite function. Basically this writes out the content of the various C structures. The stream we use is an in-memory stream. Unfortunately, for Separation colour spaces, there was a fault in the function which writes the colour space name, and it was writing out the bytes forming the address of the name instead of the actual string. This could, very rarely, mean that we would mis-identify a new colour space as being the same as an old colour space, and so would reuse the old space instead of creating a new one. I've checked the DeviceN code and it does not suffer the same problem.
* Fix the overflow case in 16 bit saturation blending.Robin Watts2020-02-271-4/+8
| | | | | | | | As seen with the second apple of the bottom row of page 1 of: gs -sDEVICE=psdcmyk16 -r72 -o out%d.psd -dMaxBitmap=2000M ../tests_private/pdf/PDF_1.7_ATS/AIX4G1C3.pdf
* Fix for bug 702150: make pl_main_run_file_utf8() check for error from ↵Julian Smith2020-02-271-0/+2
| | | | | | | s_process_read_buf(). Avoids infinite loop in: ./membin/gpcl6 -sDEVICE=ppmraw -o /dev/null .
* minor improvements to toolbin/squeeze2text.py.Julian Smith2020-02-271-8/+13
|
* CID 354310: Remove pointless unsigned comparison with 0.Robin Watts2020-02-261-4/+0
|
* CID 354291: Add error handling for inability to allocateghostpdl-9.51rc2_testChris Liddell2020-02-261-2/+2
| | | | | | | | | | | | | Coverity complained about setting dash.pattern = NULL and "Passing "&dash" to "gstate_copy_dash", which dereferences null "dash.pattern" which is either wrong, or *very* misleading. We assume that it means that gx_set_dash() *may* access that pointer. In truth, this can never happen in these circumstances. Nevertheless, in gx_set_dash() is we have a NULL mem (allocator) pointer and the dash pattern pointer is NULL at the point we have to copy into it, then throw an error.
* Fix bug 702139 - clist clipping bug.Ray Johnston2020-02-261-0/+10
| | | | | | | | | | | | | | | When characters are filled as paths, the fill_adjust may be set to 0. Clip paths are supposed to match fill paths, i.e. the 'any part of pixel' rule, so we need fill_adjust of 0.5 (not 0). The most foolproof way to fix this is to set it in the reader when processing 'begin_clip' and restore it when handling the end_clip. There are many progressions with this change, but it also exposes some cases where the change in clipping allows other elements to be seen that were previously hidden. Those few instances are minor and mostly seem to occur when page mode differs from clist mode. Examination of some of those cases shows that the clip path with clist mode now matches page mode and other elements (e.g. images) differ in extent between page and clist mode.
* Fix gx_default_copy_alpha_hl_color for 16 bit operation.Robin Watts2020-02-261-5/+3
| | | | | | | | | | | | | | The code to write the composite data back to buffers to be sent to copy_alpha was getting the first byte of each 16 bit pair wrong in the 16bit data case. Also, when we 'restart' after skipping a zero byte in the 16bit case we need to skip 2 bytes per pixel, not one. This can be seen when running: gs -r72 -o out%d.psd -sDEVICE=psdcmyk16 -dMaxBitmap=2000M ../tests_private/comparefiles/js.pdf
* Fix psdcmyk16 blending issue.Robin Watts2020-02-261-2/+2
| | | | | | | | | | Use uint32_t rather than int to avoid signedness issues. Seen in the psdcmyk16 page mode rendering of tests_private/comparefiles/Bug692766.pdf (bad colors in 4th rgb circle intersection test).
* Fix coverity issues 354292 and 354293.Robin Watts2020-02-261-6/+2
| | | | Don't bother testing an unsigned value for clipping against 0.
* Replace 0 with NULL for pointer validation/setting.Chris Liddell2020-02-261-4/+4
| | | | | Also make validation an explicit comparison with NULL i.e.: "if (mem != NULL)" rather than "if (mem)".
* Add support for multiple squeezes in one run.Julian Smith2020-02-261-1/+244
| | | | | | | E.g. MEMENTO_SQUEEZES=115867-1..+3,119928-1..+3 ... This is equivalent running multiple times with MEMENTO_FAILAT set to 115866, 115867, 11588, 119927, 119928, 119929.
* Fix for MEMENTO_FAILAT=119928: only call gs_grestoreall_for_restore() if ↵Julian Smith2020-02-262-1/+5
| | | | | | | | | | | | vmsave->gsave not NULL. Also fix error cleanup in gs_gsave_for_save(), otherwise this fix breaks previous fix for MEMENTO_FAILAT=115802. [Thanks to chrisl for this and various other recent fixes.] Fixes: MEMENTO_FAILAT=119928 LD_LIBRARY_PATH=../libbacktrace/.libs ./membin/gpdl -sDEVICE=bit -o /dev/null examples/tiger.eps
* toolbin/squeeze2text.py: improve log output.Julian Smith2020-02-261-1/+4
| | | | | | | With -p, if there is gap in 'Memory squeezing @ <N>' output (because of calls to free()), output next <N>. Also flush log output to avoid looking like we've hung.
* Fix issue with fts_14_1416.pdf and psdcmyk16Michael Vrhel2020-02-261-3/+19
| | | | | | This was missed in the fix. Affected only 16 bit devices. http://git.ghostscript.com/?p=ghostpdl.git;a=commit;h=b1ac0686eea6adcf2db8cabf7858796494b4459d
* Fix Ink names leaking.Robin Watts2020-02-261-19/+26
| | | | | | | | The cause of the leak was a typo in gx_final_DeviceN. Once this is fixed, we hit a problem where ink names are set to be a pointer to a static empty string, which can't be freed. Change to using NULL to mean empty ink name.
* Memento/Valgrind tweak.Robin Watts2020-02-261-2/+3
| | | | | Ensure we mark the contents of a block readable before we look for pointers in it, and don't overrun the end.
* Squash some unused variable warnings.Robin Watts2020-02-264-13/+12
|
* pdf14_{fill_stroke_path,clist_fill_stroke_path_pattern_setup} cleanups.Robin Watts2020-02-261-145/+99
| | | | | | | | | Use a nicer method of breaking const (to avoid warnings). Ensure that we always put everything back as it was when we leave the functions, even if we have an error. Remove needless cleanup code to handle functions that can never return an error to us returning an error.
* pdf14_clist_fill_stroke_path_pattern_setup overprint fix.Robin Watts2020-02-261-2/+2
| | | | | Only enable CompatibleOverprint for the stroke part of stroke/fill patterns if we are in a subtractive space.
* Squash some warnings with gs_swapcolors_quick breaking const.Robin Watts2020-02-265-18/+42
| | | | | | | | | | | | | | | | At various places in the code, we call gs_swapcolors_quick where we only have a const pgs. Properly, we should copy the pgs to a non-const pgs, and then use that, but that would be a performance hit. In all cases, we change the graphics state, then restore it before exit, so effectively it is const over the entire call of the enclosing procedure. Rather than having lots of small hacky casts removing const, we push the const breakage into gs_swapcolors_quick itself where we do it in the "approved" way using a union.
* Avoid floating point in gxblend.cRobin Watts2020-02-261-14/+32
| | | | Use fixed point in preference.
* Implement OPM tracking in pdfwriteKen Sharp2020-02-265-14/+17
| | | | | | | | | | | | | | | | | | | | | | More than somewhat to my surprise, the release testing of 9.51 revealed that pdfwrite was not tracking the state of overprint mode (OPM). It could be set by setdistillerparams, and in no other way. This commit adds tracking the OPM in the graphics state, removes the old overprint_mode variable from the device, but preserves the ability to alter the OPM using setdistillerparms. This also alters the initial state of OPM, the distiller params reference states that the 'factory default' of OPM is 1, but the PDF Reference says that the initial state of OPM is 0. We need to start with the correct setting of OPM so we change it form 1 to 0 in gs_pdfwr.ps. In passing, cast a const gs_gstate * to a gs_gstate * when used by gs_swapcolours_quick, in order to avoid a compiler warning. This causes a small number of progressions in files using OPM (which is rare, its even rarer to actually alter it during the course of the file)
* Bug 702117 Knockout groups containing non-isolated groupsMichael Vrhel2020-02-263-150/+152
| | | | | | | | | | | So this ended up being rather complicated. The first issue was that we were not setting the backdrop properly for non-isolated groups that reside in knockout groups. When that was fixed, it was revealed that we were not doing the recompositing operation for non-isolated knockout groups. This meant that the backdrop was getting applied twice effectively (once in the original fill and then again when the group was popped). The only file that showed this issue was the crazy Altona page with the many overlapping groups. Customer file added to provide a clearer case in the regression tests.
* Fix MEMENTO_FAILAT=115867 - segv in i_unregister_root() after failure in ↵Julian Smith2020-02-261-3/+7
| | | | | | | | | | | | | | i_register_root(). In pl_main_delete_instance(), don't call gs_unregister_root() if minst->device_root is NULL. Also in pl_top_create_device(), check return from gs_register_struct_root(). But this doesn't appear to make any difference to the handling of the memento error. Fixes: MEMENTO_FAILAT=115867 LD_LIBRARY_PATH=../libbacktrace/.libs ./membin/gpdl -sDEVICE=bit -o /dev/null examples/tiger.eps
* Fix deep color group compose issue.Robin Watts2020-02-261-2/+2
| | | | | In commit bb7d57e84e9fe I reordered parameters to keep 8/16 branches consistent, and missed one case.
* Remove needless "isolated" parameter from pdf14_mark_rect routines.Robin Watts2020-02-261-18/+17
| | | | | | | The value was carefully plumbed through (only in the 8bit case) in a recent commit, but was never actually used. Remove it a) because it's pointless passing a variable we don't use, and b) because it's another difference between 8 and 16 bit versions.
* Fix typing mistake in 16bit transparency.Robin Watts2020-02-261-2/+2
| | | | | When promoting from 8 to 16 bit, shape and src_alpha become uint16_ts rather than bytes.
* Fix more overprint problems with deep color transparency.Robin Watts2020-02-261-7/+20
| | | | | Again, overprint changes to the 8 bit paths had not been pulled across to the 16 bit path.
* Added toolbin/squeeze2text.py, for processing output from MEMENTO_SQUEEZEAT=...Julian Smith2020-02-261-0/+77
| | | | An alternative to squeeze2html.pl, outputing just summary information.
* Fix for MEMENTO_FAILAT=115802: make gs_gsave_for_save() call gs_gsave() so ↵Julian Smith2020-02-262-3/+6
| | | | | | | | | | | | | | | | | | it can restore after error. Previously, zsave() called gs_gsave_for_save() then gs_gsave(), but if gs_gsave() failed we ended up with SEGV in finalise code. To allow zsave() to restore things after gs_gsave() failure, we would need to add an include of base/gxgstate.h. Instead we remove the call of gs_gsave() from zsave() and append it to gs_gsave_for_save(), where things can be easily restored if it fails. [There are no other callers of gs_gsave_for_save().] Fixes: MEMENTO_FAILAT=115802 LD_LIBRARY_PATH=../libbacktrace/.libs ./membin/gpdl -sDEVICE=bit -o /dev/null examples/tiger.eps
* Avoid leaks if we get alloc failure when closing down (found by memento).Julian Smith2020-02-261-1/+9
| | | | | | | | | In gs_main_finit(), ignore gs_error_VMerror from interp_reclaim(). Such error ultimately comes from gs_vmreclaim() calling context_state_load(), but the missing info doesn't seem to be required for gs_main_finit() to carry on. Fixes: MEMENTO_FAILAT=147801 LD_LIBRARY_PATH=../libbacktrace/.libs ./membin/gpdl -sDEVICE=bit -o /dev/null examples/tiger.eps
* Fix image_color_icc_prep to properly align planar buffers.Robin Watts2020-02-261-19/+23
|
* Enable CAL for gxicolor halftoning.Robin Watts2020-02-264-15/+35
| | | | | | | Looks like the calling code was unfinished, and the build changes were not done. Also, squash some warnings.