aboutsummaryrefslogtreecommitdiff
path: root/multimedia/vcdimager/files/patch-frontends_xml_vcd__xml__common.c
diff options
context:
space:
mode:
Diffstat (limited to 'multimedia/vcdimager/files/patch-frontends_xml_vcd__xml__common.c')
-rw-r--r--multimedia/vcdimager/files/patch-frontends_xml_vcd__xml__common.c35
1 files changed, 35 insertions, 0 deletions
diff --git a/multimedia/vcdimager/files/patch-frontends_xml_vcd__xml__common.c b/multimedia/vcdimager/files/patch-frontends_xml_vcd__xml__common.c
new file mode 100644
index 000000000000..a76d8ce6da95
--- /dev/null
+++ b/multimedia/vcdimager/files/patch-frontends_xml_vcd__xml__common.c
@@ -0,0 +1,35 @@
+--- frontends/xml/vcd_xml_common.c.orig 2018-01-03 20:17:37 UTC
++++ frontends/xml/vcd_xml_common.c
+@@ -242,16 +242,26 @@ _convert (const char in[], const char encoding[], bool
+
+ temp = size - 1;
+ if (from) {
+- if (NULL != handler->output)
+- ret = handler->output (out, &out_size, (const unsigned char *) in, &temp);
+- else
++ if (!(handler->flags & 2) && NULL != handler->output.func)
++ ret = handler->output.func (handler->outputCtxt, out, &out_size, (const unsigned char *) in, &temp, 1);
++ if ((handler->flags & 2) && NULL != handler->output.legacyFunc)
++ ret = handler->output.legacyFunc (out, &out_size, (const unsigned char *) in, &temp);
++ else {
++ xmlCharEncCloseFunc(handler);
+ return strdup(in);
++ }
+ } else {
+- if (NULL != handler->input)
+- ret = handler->input (out, &out_size, (const unsigned char *) in, &temp);
+- else
++ if (!(handler->flags & 2) && NULL != handler->input.func)
++ ret = handler->input.func (handler->inputCtxt, out, &out_size, (const unsigned char *) in, &temp, 1);
++ if ((handler->flags & 2) && NULL != handler->input.legacyFunc)
++ ret = handler->input.legacyFunc (out, &out_size, (const unsigned char *) in, &temp);
++ else {
++ xmlCharEncCloseFunc(handler);
+ return strdup(in);
++ }
+ }
++
++ xmlCharEncCloseFunc(handler);
+
+ if (ret < 0 || (temp - size + 1))
+ {