| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
| |
When cross compiling, we shouldn't fail the recursive call to configure if
there's no freetype - since it's not required for auxtools.
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
|
|
|
|
|
|
|
| |
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.
|
| |
|
| |
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
s_process_read_buf().
Avoids infinite loop in:
./membin/gpcl6 -sDEVICE=ppmraw -o /dev/null .
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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).
|
|
|
|
| |
Don't bother testing an unsigned value for clipping against 0.
|
|
|
|
|
| |
Also make validation an explicit comparison with NULL i.e.:
"if (mem != NULL)" rather than "if (mem)".
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
This was missed in the fix. Affected only 16 bit devices.
http://git.ghostscript.com/?p=ghostpdl.git;a=commit;h=b1ac0686eea6adcf2db8cabf7858796494b4459d
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Ensure we mark the contents of a block readable before we
look for pointers in it, and don't overrun the end.
|
| |
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
Only enable CompatibleOverprint for the stroke part of stroke/fill
patterns if we are in a subtractive space.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Use fixed point in preference.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
In commit bb7d57e84e9fe I reordered parameters to keep 8/16
branches consistent, and missed one case.
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
| |
When promoting from 8 to 16 bit, shape and src_alpha become
uint16_ts rather than bytes.
|
|
|
|
|
| |
Again, overprint changes to the 8 bit paths had not been
pulled across to the 16 bit path.
|
|
|
|
| |
An alternative to squeeze2html.pl, outputing just summary information.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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
|
| |
|
|
|
|
|
|
|
| |
Looks like the calling code was unfinished, and the build
changes were not done.
Also, squash some warnings.
|