ghostscript 9: remove

It is no longer needed. Everything has been ported to GhostScript 10.

Also remove the AFPL license which is left over from GhostScript 8.
This commit is contained in:
Joachim Mairböck
2023-08-04 09:55:57 +02:00
committed by Adrien Destugues
parent 6c09b136a5
commit bbcd9a4e4d
3 changed files with 0 additions and 623 deletions

View File

@@ -1,129 +0,0 @@
SUMMARY="An interpreter for the PostScript language and for PDF (library only)"
DESCRIPTION="Ghostscript is a suite of software based on an interpreter for \
Adobe Systems' PostScript and Portable Document Format (PDF) page description \
languages. Its main purposes are the rasterization or rendering of such page \
description language files, for the display or printing of document pages, and \
the conversion between PostScript and PDF files.
This package contains only the libgs library for compatibility purposes."
HOMEPAGE="https://ghostscript.com/"
COPYRIGHT="2001-2021 Artifex Software, Inc."
LICENSE="AGPL-3.0"
REVISION="2"
SOURCE_URI="https://github.com/ArtifexSoftware/ghostpdl-downloads/releases/download/gs${portVersion//./}/ghostscript-$portVersion.tar.xz"
CHECKSUM_SHA256="6ee3057773646d6a2c6d117eb53a17d6752feadc513828e4322f68b7b7789ff6"
SOURCE_DIR="ghostscript-$portVersion"
PATCHES="ghostscript_gpl-$portVersion.patchset"
ARCHITECTURES="all !x86_gcc2"
SECONDARY_ARCHITECTURES="x86"
PROVIDES="
ghostscript_gpl9$secondaryArchSuffix = $portVersion
lib:libgs$secondaryArchSuffix = 9 compat >= 9
"
REQUIRES="
haiku$secondaryArchSuffix
poppler_data
lib:libfontconfig$secondaryArchSuffix
lib:libfreetype$secondaryArchSuffix
lib:libiconv$secondaryArchSuffix
lib:libidn$secondaryArchSuffix
lib:libjbig2dec$secondaryArchSuffix
lib:libjpeg$secondaryArchSuffix
lib:liblcms2$secondaryArchSuffix
lib:libopenjp2$secondaryArchSuffix
lib:libpaper$secondaryArchSuffix
lib:libpng16$secondaryArchSuffix
lib:libstdc++$secondaryArchSuffix
# lib:libtesseract$secondaryArchSuffix
lib:libtiff$secondaryArchSuffix
lib:libz$secondaryArchSuffix
"
PROVIDES_devel="
ghostscript_gpl9${secondaryArchSuffix}_devel = $portVersion
devel:libgs$secondaryArchSuffix = 9 compat >= 9
"
REQUIRES_devel="
ghostscript_gpl9$secondaryArchSuffix == $portVersion base
"
CONFLICTS_devel="
ghostscript_gpl${secondaryArchSuffix}_devel
"
BUILD_REQUIRES="
haiku${secondaryArchSuffix}_devel
devel:libfontconfig$secondaryArchSuffix
devel:libfreetype$secondaryArchSuffix
devel:libiconv$secondaryArchSuffix
devel:libidn$secondaryArchSuffix
devel:libjbig2dec$secondaryArchSuffix
devel:libjpeg$secondaryArchSuffix
devel:liblcms2$secondaryArchSuffix
devel:libopenjp2$secondaryArchSuffix
devel:libpaper$secondaryArchSuffix
devel:libpng16$secondaryArchSuffix
# devel:libtesseract$secondaryArchSuffix
devel:libtiff$secondaryArchSuffix
devel:libz$secondaryArchSuffix
"
BUILD_PREREQUIRES="
cmd:autoconf
cmd:awk
cmd:find
cmd:gcc$secondaryArchSuffix
cmd:grep
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:sed
"
defineDebugInfoPackage ghostscript_gpl9$secondaryArchSuffix \
"$libDir"/libgs.so.9
BUILD()
{
# Set up fonts paths
local FONTPATH
for path in \
$(findpaths B_FIND_PATH_FONTS_DIRECTORY otfonts) \
$(findpaths B_FIND_PATH_FONTS_DIRECTORY psfonts) \
$(findpaths B_FIND_PATH_FONTS_DIRECTORY ttfonts) \
$(findpaths B_FIND_PATH_FONTS_DIRECTORY X11)
do
FONTPATH="$FONTPATH${FONTPATH:+:}$path"
done
# Force configure to use system-libs
rm -rf {freetype,jbig2dec,jpeg,lcms2mt,libpng,openjpeg,tiff,zlib}
# using system libtesseract is not (yet) supported
#rm -rf {leptonica,tesseract}
autoconf
# Do configure
runConfigure ./configure \
--with-fontpath="$FONTPATH"
# Do make
make sodebug $jobArgs
}
INSTALL()
{
make install-sodebug
prepareInstalledDevelLib libgs
packageEntries devel $developDir
# remove binaries
rm -r $binDir
}
TEST()
{
make check
}

View File

@@ -1,258 +0,0 @@
Aladdin Free Public License
(Version 9, September 18, 2000)
Copyright (C) 1994, 1995, 1997, 1998, 1999, 2000 Aladdin Enterprises,
Menlo Park, California, U.S.A. All rights reserved.
NOTE: This License is not the same as any of the GNU Licenses
published by the Free Software Foundation. Its terms are
substantially different from those of the GNU Licenses. If you are
familiar with the GNU Licenses, please read this license with extra
care.
Aladdin Enterprises hereby grants to anyone the permission to apply
this License to their own work, as long as the entire License
(including the above notices and this paragraph) is copied with no
changes, additions, or deletions except for changing the first
paragraph of Section 0 to include a suitable description of the work
to which the license is being applied and of the person or entity that
holds the copyright in the work, and, if the License is being applied
to a work created in a country other than the United States, replacing
the first paragraph of Section 6 with an appropriate reference to the
laws of the appropriate country.
This License is not an Open Source license: among other things, it
places restrictions on distribution of the Program, specifically
including sale of the Program. While Aladdin Enterprises respects and
supports the philosophy of the Open Source Definition, and shares the
desire of the GNU project to keep licensed software freely
redistributable in both source and object form, we feel that Open
Source licenses unfairly prevent developers of useful software from
being compensated proportionately when others profit financially from
their work. This License attempts to ensure that those who receive,
redistribute, and contribute to the licensed Program according to the
Open Source and Free Software philosophies have the right to do so,
while retaining for the developer(s) of the Program the power to make
those who use the Program to enhance the value of commercial products
pay for the privilege of doing so.
0. Subject Matter
This License applies to the computer program known as "AFPL
Ghostscript." The "Program", below, refers to such program. The
Program is a copyrighted work whose copyright is held by artofcode
LLC, located in Benicia, California (the "Licensor"). Please note that
AFPL Ghostscript is neither the program known as "GNU Ghostscript" nor
the version of Ghostscript available for commercial licensing from
Artifex Software Inc.
A "work based on the Program" means either the Program or any
derivative work of the Program, as defined in the United States
Copyright Act of 1976, such as a translation or a modification.
BY MODIFYING OR DISTRIBUTING THE PROGRAM (OR ANY WORK BASED ON THE
PROGRAM), YOU INDICATE YOUR ACCEPTANCE OF THIS LICENSE TO DO SO, AND
ALL ITS TERMS AND CONDITIONS FOR COPYING, DISTRIBUTING OR MODIFYING
THE PROGRAM OR WORKS BASED ON IT. NOTHING OTHER THAN THIS LICENSE
GRANTS YOU PERMISSION TO MODIFY OR DISTRIBUTE THE PROGRAM OR ITS
DERIVATIVE WORKS. THESE ACTIONS ARE PROHIBITED BY LAW. IF YOU DO NOT
ACCEPT THESE TERMS AND CONDITIONS, DO NOT MODIFY OR DISTRIBUTE THE
PROGRAM.
1. Licenses.
Licensor hereby grants you the following rights, provided that you
comply with all of the restrictions set forth in this License and
provided, further, that you distribute an unmodified copy of this
License with the Program:
(a)
You may copy and distribute literal (i.e., verbatim) copies of
the Program's source code as you receive it throughout the
world, in any medium.
(b)
You may modify the Program, create works based on the Program
and distribute copies of such throughout the world, in any
medium.
2. Restrictions.
This license is subject to the following restrictions:
(a)
Distribution of the Program or any work based on the Program by
a commercial organization to any third party is prohibited if
any payment is made in connection with such distribution,
whether directly (as in payment for a copy of the Program) or
indirectly (as in payment for some service related to the
Program, or payment for some product or service that includes a
copy of the Program "without charge"; these are only examples,
and not an exhaustive enumeration of prohibited activities).
The following methods of distribution involving payment shall
not in and of themselves be a violation of this restriction:
(i)
Posting the Program on a public access information storage
and retrieval service for which a fee is received for
retrieving information (such as an on-line service),
provided that the fee is not content-dependent (i.e., the
fee would be the same for retrieving the same volume of
information consisting of random data) and that access to
the service and to the Program is available independent of
any other product or service. An example of a service that
does not fall under this section is an on-line service
that is operated by a company and that is only available
to customers of that company. (This is not an exhaustive
enumeration.)
(ii)
Distributing the Program on removable computer-readable
media, provided that the files containing the Program are
reproduced entirely and verbatim on such media, that all
information on such media be redistributable for
non-commercial purposes without charge, and that such
media are distributed by themselves (except for
accompanying documentation) independent of any other
product or service. Examples of such media include CD-ROM,
magnetic tape, and optical storage media. (This is not
intended to be an exhaustive list.) An example of a
distribution that does not fall under this section is a
CD-ROM included in a book or magazine. (This is not an
exhaustive enumeration.)
(b)
Activities other than copying, distribution and modification of
the Program are not subject to this License and they are
outside its scope. Functional use (running) of the Program is
not restricted, and any output produced through the use of the
Program is subject to this license only if its contents
constitute a work based on the Program (independent of having
been made by running the Program).
(c)
You must meet all of the following conditions with respect to
any work that you distribute or publish that in whole or in
part contains or is derived from the Program or any part
thereof ("the Work"):
(i)
If you have modified the Program, you must cause the Work
to carry prominent notices stating that you have modified
the Program's files and the date of any change. In each
source file that you have modified, you must include a
prominent notice that you have modified the file,
including your name, your e-mail address (if any), and the
date and purpose of the change;
(ii)
You must cause the Work to be licensed as a whole and at
no charge to all third parties under the terms of this
License;
(iii)
If the Work normally reads commands interactively when
run, you must cause it, at each time the Work commences
operation, to print or display an announcement including
an appropriate copyright notice and a notice that there is
no warranty (or else, saying that you provide a warranty).
Such notice must also state that users may redistribute
the Work only under the conditions of this License and
tell the user how to view the copy of this License
included with the Work. (Exceptions: if the Program is
interactive but normally prints or displays such an
announcement only at the request of a user, such as in an
"About box", the Work is required to print or display the
notice only under the same circumstances; if the Program
itself is interactive but does not normally print such an
announcement, the Work is not required to print an
announcement.);
(iv)
You must accompany the Work with the complete
corresponding machine-readable source code, delivered on a
medium customarily used for software interchange. The
source code for a work means the preferred form of the
work for making modifications to it. For an executable
work, complete source code means all the source code for
all modules it contains, plus any associated interface
definition files, plus the scripts used to control
compilation and installation of the executable code. If
you distribute with the Work any component that is
normally distributed (in either source or binary form)
with the major components (compiler, kernel, and so on) of
the operating system on which the executable runs, you
must also distribute the source code of that component if
you have it and are allowed to do so;
(v)
If you distribute any written or printed material at all
with the Work, such material must include either a written
copy of this License, or a prominent written indication
that the Work is covered by this License and written
instructions for printing and/or displaying the copy of
the License on the distribution medium;
(vi)
You may not impose any further restrictions on the
recipient's exercise of the rights granted herein.
If distribution of executable or object code is made by offering the
equivalent ability to copy from a designated place, then offering
equivalent ability to copy the source code from the same place counts
as distribution of the source code, even though third parties are not
compelled to copy the source code along with the object code.
3. Reservation of Rights.
No rights are granted to the Program except as expressly set forth
herein. You may not copy, modify, sublicense, or distribute the
Program except as expressly provided under this License. Any attempt
otherwise to copy, modify, sublicense or distribute the Program is
void, and will automatically terminate your rights under this License.
However, parties who have received copies, or rights, from you under
this License will not have their licenses terminated so long as such
parties remain in full compliance.
4. Other Restrictions.
If the distribution and/or use of the Program is restricted in certain
countries for any reason, Licensor may add an explicit geographical
distribution limitation excluding those countries, so that
distribution is permitted only in or among countries not thus
excluded. In such case, this License incorporates the limitation as if
written in the body of this License.
5. Limitations.
THE PROGRAM IS PROVIDED TO YOU "AS IS," WITHOUT WARRANTY. THERE IS NO
WARRANTY FOR THE PROGRAM, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT
NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS.
THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS
WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
WILL LICENSOR, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES,
INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES
ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT
NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR
LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM
TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER
PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES.
6. General.
This License is governed by the laws of the State of California,
U.S.A., excluding choice of law rules.
If any part of this License is found to be in conflict with the law,
that part shall be interpreted in its broadest meaning consistent with
the law, and no other parts of the License shall be affected.
For United States Government users, the Program is provided with
RESTRICTED RIGHTS. If you are a unit or agency of the United States
Government or are acquiring the Program for any such unit or agency,
the following apply:
If the unit or agency is the Department of Defense ("DOD"), the
Program and its documentation are classified as "commercial
computer software" and "commercial computer software documentation"
respectively and, pursuant to DFAR Section 227.7202, the Government
is acquiring the Program and its documentation in accordance with
the terms of this License. If the unit or agency is other than DOD,
the Program and its documentation are classified as "commercial
computer software" and "commercial computer software documentation"
respectively and, pursuant to FAR Section 12.212, the Government is
acquiring the Program and its documentation in accordance with the
terms of this License.

View File

@@ -1,236 +0,0 @@
From 15cf435ad31fd93057f1884fdcf557f2af94c7a8 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Sun, 10 Mar 2019 13:45:11 +0100
Subject: Fix build on x86 32bit
Conflict of macro name with a struct field in one of our headers.
diff --git a/psi/estack.h b/psi/estack.h
index 42a5c0a..786787d 100644
--- a/psi/estack.h
+++ b/psi/estack.h
@@ -18,6 +18,8 @@
#ifndef estack_INCLUDED
# define estack_INCLUDED
+#include <signal.h> /* before we #define esp, which prevents it from building */
+
#include "iestack.h"
#include "icstate.h" /* for access to exec_stack */
--
2.37.3
From d904d6367b73e55d1ae08cd95bcb3bfcc34ee3d7 Mon Sep 17 00:00:00 2001
From: Adrien Destugues <pulkomandy@pulkomandy.tk>
Date: Wed, 13 Mar 2019 21:14:28 +0100
Subject: fix building shared libs
diff --git a/configure.ac b/configure.ac
index 36b51f5..3312477 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3031,7 +3031,7 @@ case $host in
GPDL_SONAME_MAJOR="lib\$(GPDL${libname3}"
GPDL_SONAME_MAJOR_MINOR="cyg\$(GPDL${libname2}"
;;
- *bsd*)
+ *bsd*|*haiku*)
DYNAMIC_CFLAGS="-fPIC $DYNAMIC_CFLAGS"
GS_DYNAMIC_LDFLAGS="-shared -Wl,\$(LD_SET_DT_SONAME)\$(LDFLAGS_SO_PREFIX)\$(GS_SONAME_MAJOR)"
PCL_DYNAMIC_LDFLAGS="-shared -Wl,\$(LD_SET_DT_SONAME)\$(LDFLAGS_SO_PREFIX)\$(PCL_SONAME_MAJOR)"
--
2.37.3
From 172e49fed7566e77853a377495d39e4ab0c08a9a Mon Sep 17 00:00:00 2001
From: Robin Watts <Robin.Watts@artifex.com>
Date: Fri, 1 Oct 2021 12:44:44 +0100
Subject: Bug 704405: Fix typo in non-forked lcms2 code.
diff --git a/base/gsicc_lcms2.c b/base/gsicc_lcms2.c
index ccf1d70..9badb6d 100644
--- a/base/gsicc_lcms2.c
+++ b/base/gsicc_lcms2.c
@@ -462,7 +462,7 @@ int
gscms_transform_color(gx_device *dev, gsicc_link_t *icclink, void *inputcolor,
void *outputcolor, int num_bytes)
{
- return gscms_transformm_color_const(dev, icclink, inputcolor, outputcolor, num_bytes);
+ return gscms_transform_color_const(dev, icclink, inputcolor, outputcolor, num_bytes);
}
int
--
2.37.3
From cddfe4fd3a9ea86cfc741d756feb56621b570064 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Joachim=20Mairb=C3=B6ck?= <j.mairboeck@gmail.com>
Date: Sun, 31 Oct 2021 22:03:15 +0100
Subject: fix looking for dlopen in libdl only
diff --git a/configure.ac b/configure.ac
index 3312477..f627cbf 100644
--- a/configure.ac
+++ b/configure.ac
@@ -664,8 +664,8 @@ if test "x$ac_cv_header_inttypes_h" = "xyes"; then
GCFLAGS="$GCFLAGS -DHAVE_INTTYPES_H=1"
fi
-AC_CHECK_LIB([dl], [dlopen],
- [AC_CHECK_HEADER([dlfcn.h], [GCFLAGS="$GCFLAGS -DHAVE_LIBDL=1";LIBS="-ldl $LIBS"])]
+AC_SEARCH_LIBS([dlopen], [dl],
+ [AC_CHECK_HEADER([dlfcn.h], [GCFLAGS="$GCFLAGS -DHAVE_LIBDL=1"])]
)
large_color_index=1
--
2.37.3
From 142feac4adcaf527d6e91d146391ffc24647b5cb Mon Sep 17 00:00:00 2001
From: Anarchos <sylvain_kerjean@hotmail.com>
Date: Wed, 2 Mar 2022 21:15:32 +0100
Subject: debug flags for haiku
diff --git a/configure.ac b/configure.ac
index f627cbf..d6563de 100644
--- a/configure.ac
+++ b/configure.ac
@@ -284,7 +284,7 @@ SET_DT_SONAME="-soname="
CFLAGS_LARGEFILE=""
case $host in
- *-linux*|*-gnu)
+ *-linux*|*-gnu|*-haiku)
if test $GCC = yes; then
CC_OPT_FLAGS_TO_TRY="-O2 -DNDEBUG"
CC_DBG_FLAGS_TO_TRY="-gdwarf-2 -g3 -O0"
--
2.37.3
From e95c53554733b0cb22e23d5a2e859d3491c19c62 Mon Sep 17 00:00:00 2001
From: Anarchos <sylvain_kerjean@hotmail.com>
Date: Fri, 4 Mar 2022 05:47:01 +0100
Subject: -g
diff --git a/configure.ac b/configure.ac
index d6563de..d682a97 100644
--- a/configure.ac
+++ b/configure.ac
@@ -287,7 +287,7 @@ case $host in
*-linux*|*-gnu|*-haiku)
if test $GCC = yes; then
CC_OPT_FLAGS_TO_TRY="-O2 -DNDEBUG"
- CC_DBG_FLAGS_TO_TRY="-gdwarf-2 -g3 -O0"
+ CC_DBG_FLAGS_TO_TRY="-g"
CC_VISIBILITY_FLAGS_TO_TRY="-fvisibility=hidden"
fi
;;
--
2.37.3
From 106649b8eac0634fcf494e2271b2b74e050f87a3 Mon Sep 17 00:00:00 2001
From: Anarchos <sylvain_kerjean@hotmail.com>
Date: Thu, 10 Mar 2022 17:11:47 +0100
Subject: debug flags
diff --git a/base/unix-dll.mak b/base/unix-dll.mak
index e83390c..3bb6c34 100644
--- a/base/unix-dll.mak
+++ b/base/unix-dll.mak
@@ -427,7 +427,8 @@ soinstall:
$(MAKE) $(SUB_MAKE_OPTION) soinstall-subtarget BUILDDIRPREFIX=$(SODIRPREFIX)
sodebuginstall:
- $(MAKE) $(SUB_MAKE_OPTION) soinstall-subtarget GENOPT='-DDEBUG' BUILDDIRPREFIX=$(SODEBUGDIRPREFIX)
+ GENOPT='-DDEBUG -g'
+ $(MAKE) $(SUB_MAKE_OPTION) soinstall-subtarget GENOPT='$(GENOPT)' BUILDDIRPREFIX=$(SODEBUGDIRPREFIX)
soinstall-subtarget: install-so install-scripts install-data $(INSTALL_SHARED) $(INSTALL_CONTRIB)
--
2.37.3
From 89994ad54820a468d0065a75076957ef16c836fc Mon Sep 17 00:00:00 2001
From: Anarchos <sylvain_kerjean@hotmail.com>
Date: Thu, 10 Mar 2022 21:44:39 +0100
Subject: revert
diff --git a/base/unix-dll.mak b/base/unix-dll.mak
index 3bb6c34..e83390c 100644
--- a/base/unix-dll.mak
+++ b/base/unix-dll.mak
@@ -427,8 +427,7 @@ soinstall:
$(MAKE) $(SUB_MAKE_OPTION) soinstall-subtarget BUILDDIRPREFIX=$(SODIRPREFIX)
sodebuginstall:
- GENOPT='-DDEBUG -g'
- $(MAKE) $(SUB_MAKE_OPTION) soinstall-subtarget GENOPT='$(GENOPT)' BUILDDIRPREFIX=$(SODEBUGDIRPREFIX)
+ $(MAKE) $(SUB_MAKE_OPTION) soinstall-subtarget GENOPT='-DDEBUG' BUILDDIRPREFIX=$(SODEBUGDIRPREFIX)
soinstall-subtarget: install-so install-scripts install-data $(INSTALL_SHARED) $(INSTALL_CONTRIB)
--
2.37.3
From ca4f3c106f175ec0890661f95b2d59f7ae539bcf Mon Sep 17 00:00:00 2001
From: Ken Sharp <ken.sharp@artifex.com>
Date: Fri, 24 Mar 2023 13:19:57 +0000
Subject: Graphics library - prevent buffer overrun in (T)BCP encoding
Bug #706494 "Buffer Overflow in s_xBCPE_process"
As described in detail in the bug report, if the write buffer is filled
to one byte less than full, and we then try to write an escaped
character, we overrun the buffer because we don't check before
writing two bytes to it.
This just checks if we have two bytes before starting to write an
escaped character and exits if we don't (replacing the consumed byte
of the input).
Up for further discussion; why do we even permit a BCP encoding filter
anyway ? I think we should remove this, at least when SAFER is true.
diff --git a/base/sbcp.c b/base/sbcp.c
index 979ae09..47fc233 100644
--- a/base/sbcp.c
+++ b/base/sbcp.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001-2021 Artifex Software, Inc.
+/* Copyright (C) 2001-2023 Artifex Software, Inc.
All Rights Reserved.
This software is provided AS-IS with no warranty, either express or
@@ -50,6 +50,14 @@ s_xBCPE_process(stream_state * st, stream_cursor_read * pr,
byte ch = *++p;
if (ch <= 31 && escaped[ch]) {
+ /* Make sure we have space to store two characters in the write buffer,
+ * if we don't then exit without consuming the input character, we'll process
+ * that on the next time round.
+ */
+ if (pw->limit - q < 2) {
+ p--;
+ break;
+ }
if (p == rlimit) {
p--;
break;
--
2.37.3