[packages/vcdimager] - added patch for libxml2 2.14 compatibility; release 6
qboosh
qboosh at pld-linux.org
Sun Jul 20 18:21:25 CEST 2025
commit 9248fad8cf399bf54bf03adbe32f1f11467d7075
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date: Sun Jul 20 18:23:06 2025 +0200
- added patch for libxml2 2.14 compatibility; release 6
vcdimager-libxml2.patch | 60 +++++++++++++++++++++++++++++++++++++++++++++++++
vcdimager.spec | 6 +++--
2 files changed, 64 insertions(+), 2 deletions(-)
---
diff --git a/vcdimager.spec b/vcdimager.spec
index 42b6586..b52db94 100644
--- a/vcdimager.spec
+++ b/vcdimager.spec
@@ -6,12 +6,13 @@ Summary: VideoCD (pre-)mastering and ripping tools
Summary(pl.UTF-8): Narzędzia do tworzenia i odczytu VideoCD
Name: vcdimager
Version: 2.0.1
-Release: 5
+Release: 6
License: GPL v2+
Group: Applications/File
-Source0: http://ftp.gnu.org/gnu/vcdimager/%{name}-%{version}.tar.gz
+Source0: https://ftp.gnu.org/gnu/vcdimager/%{name}-%{version}.tar.gz
# Source0-md5: 3890d73da62d0607c87962c41cd33a29
Patch0: %{name}-info.patch
+Patch1: %{name}-libxml2.patch
URL: http://www.gnu.org/software/vcdimager/
BuildRequires: autoconf >= 2.61
BuildRequires: automake >= 1.6.0
@@ -74,6 +75,7 @@ Statyczne biblioteki vcd.
%prep
%setup -q
%patch -P0 -p1
+%patch -P1 -p1
%build
%{__libtoolize}
diff --git a/vcdimager-libxml2.patch b/vcdimager-libxml2.patch
new file mode 100644
index 0000000..99bd87e
--- /dev/null
+++ b/vcdimager-libxml2.patch
@@ -0,0 +1,60 @@
+--- vcdimager-2.0.1/frontends/xml/vcd_xml_common.c.orig 2018-01-03 21:17:37.000000000 +0100
++++ vcdimager-2.0.1/frontends/xml/vcd_xml_common.c 2025-07-20 18:20:47.192016138 +0200
+@@ -223,8 +223,9 @@ static char *
+ _convert (const char in[], const char encoding[], bool from)
+ {
+ unsigned char *out;
+- int ret, size, out_size, temp;
++ int ret, size, out_size;
+ xmlCharEncodingHandlerPtr handler = 0;
++ xmlBufferPtr inbuf, outbuf;
+
+ if (!in)
+ return 0;
+@@ -236,32 +237,30 @@ _convert (const char in[], const char en
+
+ size = (int) strlen (in) + 1;
+ out_size = size * 2 - 1;
+- out = malloc ((size_t) out_size);
+
+- vcd_assert (out != 0);
++ if ((outbuf = xmlBufferCreateSize(out_size)) == NULL)
++ return 0;
++ if ((inbuf = xmlBufferCreateStatic(in, size - 1)) == NULL)
++ {
++ xmlBufferFree(outbuf);
++ return 0;
++ }
+
+- temp = size - 1;
+ if (from) {
+- if (NULL != handler->output)
+- ret = handler->output (out, &out_size, (const unsigned char *) in, &temp);
+- else
+- return strdup(in);
++ ret = xmlCharEncOutFunc(handler, outbuf, inbuf);
+ } else {
+- if (NULL != handler->input)
+- ret = handler->input (out, &out_size, (const unsigned char *) in, &temp);
+- else
+- return strdup(in);
++ ret = xmlCharEncInFunc(handler, outbuf, inbuf);
+ }
+
+- if (ret < 0 || (temp - size + 1))
++ xmlBufferFree(inbuf);
++ if (ret < 0)
+ {
+- free (out);
++ xmlBufferFree (outbuf);
+ vcd_error ("charset conversion failed for encoding '%s'", encoding);
+ return 0;
+ }
+-
+- out = realloc (out, out_size + 1);
+- out[out_size] = 0;
++ out = xmlBufferDetach(outbuf);
++ xmlBufferFree(outbuf);
+
+ return (char *) out;
+ }
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/vcdimager.git/commitdiff/9248fad8cf399bf54bf03adbe32f1f11467d7075
More information about the pld-cvs-commit
mailing list