summaryrefslogtreecommitdiff
path: root/devices/gdevdsp.c
diff options
context:
space:
mode:
authorRobin Watts <Robin.Watts@artifex.com>2021-01-14 19:45:33 +0000
committerRobin Watts <Robin.Watts@artifex.com>2021-01-14 19:57:40 +0000
commitf9723a92bcb3ab1de8f5cf16da5b5e6c807eeda2 (patch)
tree75ee72a8ae74fbe8580c7d761f66267b0a8467a5 /devices/gdevdsp.c
parent496d1d927acfe2460b69552f372f9ec7a411a172 (diff)
downloadghostpdl-f9723a92bcb3ab1de8f5cf16da5b5e6c807eeda2.tar.gz
Bug 703336: Fix GPL crash with jpg input on 64bit windows.
The Jpeg code uses setjmp/longjmp for error handling. On Windows at least, in 64bit builds, jmpbufs need to be 16 byte aligned. This is generally achieved by malloc blocks being 16 byte aligned, and structures have their offsets calculated so that their contents lie at appropriate positions. Unfortunately, our malloc routines only align to 8 byte aligned. We therefore bend the jpgtop.c code to align the jmpbuf manually. Similar tricks are required in the pngtop.c code, which also uses setjmp/longjmp, but a slightly different approach has to be taken as the png routine allocates the structure with the callback in itself, so we don't get to align just that. Instead, we modify the allocation routines that we provide to pnglib so that blocks are correctly padded.
Diffstat (limited to 'devices/gdevdsp.c')
0 files changed, 0 insertions, 0 deletions