id3lib: initial commit, fixing build for gcc 12

This commit is contained in:
John McQuah 2023-01-18 16:32:27 -05:00
parent b587846898
commit 7374649f86
10 changed files with 491 additions and 0 deletions

10
REPO
View File

@ -59,6 +59,7 @@ d:python3-leather
d:python3-agate
d:szip
d:gl2ps
d:id3lib
d:glew-egl
d:deadbeef-alarm
d:oksh
@ -276,6 +277,15 @@ f:5a1495ba54a541d79d29e7ce959d1d05:szip/.footprint
f:966dd6a0f0d6c91c99f92ad91a9bffc5:gl2ps/.signature
f:aa6c9534b6d4e68b9864d5d9f63bf0ec:gl2ps/Pkgfile
f:aa56dda5637db25cffd60e5bfb1a6f52:gl2ps/.footprint
f:cc4c3005feafb064c01004f3f18fe3fb:id3lib/id3lib-3.8.3-missing-nullptr-check.patch
f:3768447c6764adb0d437d46c3544759e:id3lib/.signature
f:6e67b3c2cd51992521ab7f7a7fd4a1bc:id3lib/Pkgfile
f:196c65adee1ba511ddacef2de0dfd102:id3lib/id3lib-3.8.3-unicode16.patch
f:752caa707a7aac5aee6c527cd4b2cdf7:id3lib/id3lib-3.8.3-cpp-headers.patch
f:328ac5b15fbe7f3ccdf72da033a510a0:id3lib/id3lib-3.8.3-autoconf259.patch
f:1d9ec6fb6492a6c2eb4c17b0d85b9b8b:id3lib/id3lib-3.8.3-abi-fix.patch
f:0b964ef0b6d9a85bba15f5a493f478e2:id3lib/.footprint
f:adb1915e31d29f04d0e8b597ed8946b4:id3lib/CVE-2007-4460.diff
f:5101b22dd46f31fed2487e54fd2c46b0:glew-egl/README
f:7ffe2e6548a2f179bb67a416a608fe8c:glew-egl/.signature
f:de61ad54aab1871b60eb71eee9af20fe:glew-egl/Pkgfile

27
id3lib/.footprint Normal file
View File

@ -0,0 +1,27 @@
drwxr-xr-x root/root usr/
drwxr-xr-x root/root usr/bin/
-rwxr-xr-x root/root usr/bin/id3convert
-rwxr-xr-x root/root usr/bin/id3cp
-rwxr-xr-x root/root usr/bin/id3info
-rwxr-xr-x root/root usr/bin/id3tag
drwxr-xr-x root/root usr/include/
-rw-r--r-- root/root usr/include/id3.h
drwxr-xr-x root/root usr/include/id3/
-rw-r--r-- root/root usr/include/id3/field.h
-rw-r--r-- root/root usr/include/id3/globals.h
-rw-r--r-- root/root usr/include/id3/id3lib_frame.h
-rw-r--r-- root/root usr/include/id3/id3lib_streams.h
-rw-r--r-- root/root usr/include/id3/id3lib_strings.h
-rw-r--r-- root/root usr/include/id3/misc_support.h
-rw-r--r-- root/root usr/include/id3/reader.h
-rw-r--r-- root/root usr/include/id3/readers.h
-rw-r--r-- root/root usr/include/id3/sized_types.h
-rw-r--r-- root/root usr/include/id3/tag.h
-rw-r--r-- root/root usr/include/id3/utils.h
-rw-r--r-- root/root usr/include/id3/writer.h
-rw-r--r-- root/root usr/include/id3/writers.h
drwxr-xr-x root/root usr/lib/
lrwxrwxrwx root/root usr/lib/libid3-3.8.so.3 -> libid3-3.8.so.3.0.0
-rwxr-xr-x root/root usr/lib/libid3-3.8.so.3.0.0
-rwxr-xr-x root/root usr/lib/libid3.la
lrwxrwxrwx root/root usr/lib/libid3.so -> libid3-3.8.so.3.0.0

11
id3lib/.signature Normal file
View File

@ -0,0 +1,11 @@
untrusted comment: verify with /etc/ports/jmq.pub
RWTTPlFarK9CxMa2JVpUB9ljNxLOfDMUr0xXZn7ED5c0v2ixojrLI0glSTwSAvOwwuAtsm2qmjbP12+f+ltqBx9LzpxGVuvX4g0=
SHA256 (Pkgfile) = 4b36cf1b19156e7f4f5535eddc86ad2c0c4521558fe23aa91f5eecfecf7e6c86
SHA256 (.footprint) = 1d74d6500595dabc037211dece8cd72001d3bba213949d521b3275087f0afa85
SHA256 (id3lib-3.8.3.tar.gz) = 2749cc3c0cd7280b299518b1ddf5a5bcfe2d1100614519b68702230e26c7d079
SHA256 (id3lib-3.8.3-cpp-headers.patch) = d0c0c90a94afe88ec0a284a771c60f705be9da707c8cac149134916c20fbd4e8
SHA256 (id3lib-3.8.3-autoconf259.patch) = ffde572cb263cce4585292143a4396ebd12592ac34b398da19d1608f1c2374f9
SHA256 (id3lib-3.8.3-unicode16.patch) = 71c79002d9485965a3a93e87ecbd7fed8f89f64340433b7ccd263d21385ac969
SHA256 (id3lib-3.8.3-missing-nullptr-check.patch) = cdfdee4d6d1bc93bece50e873595e2bedcce559f68cf8b537739c8f2fe90ad20
SHA256 (id3lib-3.8.3-abi-fix.patch) = 51fb502f76f918d44efa5ee62c6835c83467ef7363f37d5d6798a2a3e5346e44
SHA256 (CVE-2007-4460.diff) = 631545e2460cdd0f0566034149a51f409eda3c19871dd7d4c1c5280febc53a2f

51
id3lib/CVE-2007-4460.diff Normal file
View File

@ -0,0 +1,51 @@
--- id3lib3.8.3-3.8.3.orig/src/tag_file.cpp
+++ id3lib3.8.3-3.8.3/src/tag_file.cpp
@@ -242,8 +242,8 @@
strcpy(sTempFile, filename.c_str());
strcat(sTempFile, sTmpSuffix.c_str());
-#if ((defined(__GNUC__) && __GNUC__ >= 3 ) || !defined(HAVE_MKSTEMP))
- // This section is for Windows folk && gcc 3.x folk
+#if !defined(HAVE_MKSTEMP)
+ // This section is for Windows folk
fstream tmpOut;
createFile(sTempFile, tmpOut);
@@ -257,7 +257,7 @@
tmpOut.write((char *)tmpBuffer, nBytes);
}
-#else //((defined(__GNUC__) && __GNUC__ >= 3 ) || !defined(HAVE_MKSTEMP))
+#else //!defined(HAVE_MKSTEMP)
// else we gotta make a temp file, copy the tag into it, copy the
// rest of the old file after the tag, delete the old file, rename
@@ -270,7 +270,7 @@
//ID3_THROW_DESC(ID3E_NoFile, "couldn't open temp file");
}
- ofstream tmpOut(fd);
+ ofstream tmpOut(sTempFile);
if (!tmpOut)
{
tmpOut.close();
@@ -285,14 +285,14 @@
uchar tmpBuffer[BUFSIZ];
while (file)
{
- file.read(tmpBuffer, BUFSIZ);
+ file.read((char *)tmpBuffer, BUFSIZ);
size_t nBytes = file.gcount();
- tmpOut.write(tmpBuffer, nBytes);
+ tmpOut.write((char *)tmpBuffer, nBytes);
}
close(fd); //closes the file
-#endif ////((defined(__GNUC__) && __GNUC__ >= 3 ) || !defined(HAVE_MKSTEMP))
+#endif ////!defined(HAVE_MKSTEMP)
tmpOut.close();
file.close();
only in patch2:
unchanged:

38
id3lib/Pkgfile Normal file
View File

@ -0,0 +1,38 @@
# Description: An open-source, cross-platform library for reading/writing/manipulating ID3 tags.
# URL: http://id3lib.sourceforge.net/
# Maintainer: John McQuah, jmcquah at disroot dot org
# Depends on: zlib
name=id3lib
version=3.8.3
release=4
source=(http://downloads.sourceforge.net/project/$name/$name/$version/$name-$version.tar.gz
$name-$version-cpp-headers.patch
$name-$version-autoconf259.patch
$name-$version-unicode16.patch
$name-$version-missing-nullptr-check.patch
$name-$version-abi-fix.patch
CVE-2007-4460.diff)
build() {
cd $name-$version
patch -p1 -i $SRC/$name-$version-cpp-headers.patch
patch -p1 -i $SRC/$name-$version-autoconf259.patch
patch -p1 -i $SRC/$name-$version-unicode16.patch
patch -p1 -i $SRC/$name-$version-missing-nullptr-check.patch
patch -p1 -i $SRC/$name-$version-abi-fix.patch
patch -p1 -i $SRC/CVE-2007-4460.diff
sed -i 's/^AM_CONFIG_HEADER/AC_CONFIG_HEADERS/' {.,zlib}/configure.in
autoreconf -ivfs # buggy configure
./configure --prefix=/usr \
--disable-static \
--disable-assert \
--enable-debug=no
make
make DESTDIR=$PKG install
}

View File

@ -0,0 +1,226 @@
--- a/include/id3.h
+++ b/include/id3.h
@@ -47,12 +47,12 @@ extern "C"
ID3_C_EXPORT ID3Tag* CCONV ID3Tag_New (void);
ID3_C_EXPORT void CCONV ID3Tag_Delete (ID3Tag *tag);
ID3_C_EXPORT void CCONV ID3Tag_Clear (ID3Tag *tag);
- ID3_C_EXPORT bool CCONV ID3Tag_HasChanged (const ID3Tag *tag);
- ID3_C_EXPORT void CCONV ID3Tag_SetUnsync (ID3Tag *tag, bool unsync);
- ID3_C_EXPORT void CCONV ID3Tag_SetExtendedHeader (ID3Tag *tag, bool ext);
- ID3_C_EXPORT void CCONV ID3Tag_SetPadding (ID3Tag *tag, bool pad);
+ ID3_C_EXPORT ID3_Bool CCONV ID3Tag_HasChanged (const ID3Tag *tag);
+ ID3_C_EXPORT void CCONV ID3Tag_SetUnsync (ID3Tag *tag, ID3_Bool unsync);
+ ID3_C_EXPORT void CCONV ID3Tag_SetExtendedHeader (ID3Tag *tag, ID3_Bool ext);
+ ID3_C_EXPORT void CCONV ID3Tag_SetPadding (ID3Tag *tag, ID3_Bool pad);
ID3_C_EXPORT void CCONV ID3Tag_AddFrame (ID3Tag *tag, const ID3Frame *frame);
- ID3_C_EXPORT bool CCONV ID3Tag_AttachFrame (ID3Tag *tag, ID3Frame *frame);
+ ID3_C_EXPORT ID3_Bool CCONV ID3Tag_AttachFrame (ID3Tag *tag, ID3Frame *frame);
ID3_C_EXPORT void CCONV ID3Tag_AddFrames (ID3Tag *tag, const ID3Frame *frames, size_t num);
ID3_C_EXPORT ID3Frame* CCONV ID3Tag_RemoveFrame (ID3Tag *tag, const ID3Frame *frame);
ID3_C_EXPORT ID3_Err CCONV ID3Tag_Parse (ID3Tag *tag, const uchar header[ID3_TAGHEADERSIZE], const uchar *buffer);
@@ -66,7 +66,7 @@ extern "C"
ID3_C_EXPORT ID3Frame* CCONV ID3Tag_FindFrameWithASCII (const ID3Tag *tag, ID3_FrameID id, ID3_FieldID fld, const char *data);
ID3_C_EXPORT ID3Frame* CCONV ID3Tag_FindFrameWithUNICODE (const ID3Tag *tag, ID3_FrameID id, ID3_FieldID fld, const unicode_t *data);
ID3_C_EXPORT size_t CCONV ID3Tag_NumFrames (const ID3Tag *tag);
- ID3_C_EXPORT bool CCONV ID3Tag_HasTagType (const ID3Tag *tag, ID3_TagType);
+ ID3_C_EXPORT ID3_Bool CCONV ID3Tag_HasTagType (const ID3Tag *tag, ID3_TagType);
ID3_C_EXPORT ID3TagIterator* CCONV ID3Tag_CreateIterator (ID3Tag *tag);
ID3_C_EXPORT ID3TagConstIterator* CCONV ID3Tag_CreateConstIterator (const ID3Tag *tag);
@@ -83,8 +83,8 @@ extern "C"
ID3_C_EXPORT void CCONV ID3Frame_SetID (ID3Frame *frame, ID3_FrameID id);
ID3_C_EXPORT ID3_FrameID CCONV ID3Frame_GetID (const ID3Frame *frame);
ID3_C_EXPORT ID3Field* CCONV ID3Frame_GetField (const ID3Frame *frame, ID3_FieldID name);
- ID3_C_EXPORT void CCONV ID3Frame_SetCompression (ID3Frame *frame, bool comp);
- ID3_C_EXPORT bool CCONV ID3Frame_GetCompression (const ID3Frame *frame);
+ ID3_C_EXPORT void CCONV ID3Frame_SetCompression (ID3Frame *frame, ID3_Bool comp);
+ ID3_C_EXPORT ID3_Bool CCONV ID3Frame_GetCompression (const ID3Frame *frame);
/* field wrappers */
ID3_C_EXPORT void CCONV ID3Field_Clear (ID3Field *field);
@@ -116,7 +116,7 @@ extern "C"
ID3_C_EXPORT flags_t CCONV ID3FrameInfo_FieldFlags (ID3_FrameID frameid, int fieldnum);
/* Deprecated */
- ID3_C_EXPORT void CCONV ID3Tag_SetCompression (ID3Tag *tag, bool comp);
+ ID3_C_EXPORT void CCONV ID3Tag_SetCompression (ID3Tag *tag, ID3_Bool comp);
#ifdef __cplusplus
}
--- a/include/id3/globals.h
+++ b/include/id3/globals.h
@@ -82,14 +82,10 @@
#define ID3_C_VAR extern
-#ifndef __cplusplus
-
-typedef int bool;
-# define false (0)
-# define true (!false)
-
-#endif /* __cplusplus */
+typedef int ID3_Bool;
+# define ID3_False 0
+# define ID3_True 1
ID3_C_VAR const char * const ID3LIB_NAME;
ID3_C_VAR const char * const ID3LIB_RELEASE;
ID3_C_VAR const char * const ID3LIB_FULL_NAME;
@@ -532,9 +530,9 @@ ID3_STRUCT(Mp3_Headerinfo)
uint32 framesize;
uint32 frames; // nr of frames
uint32 time; // nr of seconds in song
- bool privatebit;
- bool copyrighted;
- bool original;
+ ID3_Bool privatebit;
+ ID3_Bool copyrighted;
+ ID3_Bool original;
};
#define ID3_NR_OF_V1_GENRES 148
--- a/src/c_wrapper.cpp
+++ b/src/c_wrapper.cpp
@@ -72,10 +72,10 @@ extern "C"
}
- ID3_C_EXPORT bool CCONV
+ ID3_C_EXPORT ID3_Bool CCONV
ID3Tag_HasChanged(const ID3Tag *tag)
{
- bool changed = false;
+ ID3_Bool changed = ID3_False;
if (tag)
{
@@ -87,7 +87,7 @@ extern "C"
ID3_C_EXPORT void CCONV
- ID3Tag_SetUnsync(ID3Tag *tag, bool unsync)
+ ID3Tag_SetUnsync(ID3Tag *tag, ID3_Bool unsync)
{
if (tag)
{
@@ -97,7 +97,7 @@ extern "C"
ID3_C_EXPORT void CCONV
- ID3Tag_SetExtendedHeader(ID3Tag *tag, bool ext)
+ ID3Tag_SetExtendedHeader(ID3Tag *tag, ID3_Bool ext)
{
if (tag)
{
@@ -106,7 +106,7 @@ extern "C"
}
ID3_C_EXPORT void CCONV
- ID3Tag_SetPadding(ID3Tag *tag, bool pad)
+ ID3Tag_SetPadding(ID3Tag *tag, ID3_Bool pad)
{
if (tag)
{
@@ -125,10 +125,10 @@ extern "C"
}
- ID3_C_EXPORT bool CCONV
+ ID3_C_EXPORT ID3_Bool CCONV
ID3Tag_AttachFrame(ID3Tag *tag, ID3Frame *frame)
{
- bool b = false;
+ ID3_Bool b = ID3_False;
if (tag)
{
ID3_CATCH(b = reinterpret_cast<ID3_Tag *>(tag)->AttachFrame(reinterpret_cast<ID3_Frame *>(frame)));
@@ -303,10 +303,10 @@ extern "C"
}
- ID3_C_EXPORT bool CCONV
+ ID3_C_EXPORT ID3_Bool CCONV
ID3Tag_HasTagType(const ID3Tag *tag, ID3_TagType tt)
{
- bool has_tt = false;
+ ID3_Bool has_tt = ID3_False;
if (tag)
{
@@ -459,7 +459,7 @@ extern "C"
ID3_C_EXPORT void CCONV
- ID3Frame_SetCompression(ID3Frame *frame, bool comp)
+ ID3Frame_SetCompression(ID3Frame *frame, ID3_Bool comp)
{
if (frame)
{
@@ -468,10 +468,10 @@ extern "C"
}
- ID3_C_EXPORT bool CCONV
+ ID3_C_EXPORT ID3_Bool CCONV
ID3Frame_GetCompression(const ID3Frame *frame)
{
- bool compressed = false;
+ ID3_Bool compressed = ID3_False;
if (frame)
{
ID3_CATCH(compressed = reinterpret_cast<const ID3_Frame *>(frame)->GetCompression());
--- a/examples/findeng.cpp
+++ b/examples/findeng.cpp
@@ -9,7 +9,7 @@
using std::cout;
using std::endl;
-int main(unsigned argc, char* argv[])
+int main(int argc, char* argv[])
{
ID3D_INIT_DOUT();
ID3D_INIT_WARNING();
--- a/examples/findstr.cpp
+++ b/examples/findstr.cpp
@@ -9,7 +9,7 @@
using std::cout;
using std::endl;
-int main(unsigned argc, char* argv[])
+int main(int argc, char* argv[])
{
ID3D_INIT_DOUT();
ID3D_INIT_WARNING();
--- a/examples/test_io.cpp
+++ b/examples/test_io.cpp
@@ -18,13 +18,13 @@ using std::cerr;
using namespace dami;
int
-main(size_t argc, const char** argv)
+main(int argc, const char** argv)
{
ID3D_INIT_DOUT();
ID3D_INIT_WARNING();
ID3D_INIT_NOTICE();
- ID3_IStreamReader isr(cin);
+ ID3_IStreamReader isr(std::cin);
BString orig = io::readAllBinary(isr);
cout << "input size: " << orig.size() << endl;
@@ -116,7 +116,7 @@ main(size_t argc, const char** argv)
cout << "binary number:";
for (size_t i = 0; i < number.size(); ++i)
{
- cout << " 0x" << hex << (size_t) (0xFF & number[i]) << dec;
+ cout << " 0x" << std::hex << (size_t) (0xFF & number[i]) << std::dec;
}
cout << endl;

View File

@ -0,0 +1,31 @@
Index: id3lib-3.8.3/configure.in
===================================================================
--- id3lib-3.8.3.orig/configure.in
+++ id3lib-3.8.3/configure.in
@@ -168,7 +168,7 @@ if test $has_iconv = 1; then
iconv_oldstyle=1, iconv_oldstyle=0)
if test $iconv_oldstyle = 1; then
AC_MSG_RESULT(const char **)
- AC_DEFINE(ID3LIB_ICONV_OLDSTYLE)
+ AC_DEFINE(ID3LIB_ICONV_OLDSTYLE, [], [Unknown])
#we'll check out the need of
#typecast in the call of iconv_open
AC_MSG_CHECKING(whether to typecast in iconv)
@@ -184,7 +184,7 @@ if test $has_iconv = 1; then
iconv_cast=0, iconv_cast=1)
if test $iconv_cast = 1; then
AC_MSG_RESULT(yes)
- AC_DEFINE(ID3LIB_ICONV_CAST_OK)
+ AC_DEFINE(ID3LIB_ICONV_CAST_OK, [], [Unknown])
else
AC_MSG_RESULT(no)
fi
@@ -206,7 +206,7 @@ if test $has_iconv = 1; then
iconv_cast=0, iconv_cast=1)
if test $iconv_cast = 1; then
AC_MSG_RESULT(yes)
- AC_DEFINE(ID3LIB_ICONV_CAST_OK)
+ AC_DEFINE(ID3LIB_ICONV_CAST_OK, [], [Unknown])
else
AC_MSG_RESULT(no)
fi

View File

@ -0,0 +1,21 @@
--- a/include/id3/id3lib_strings.h
+++ b/include/id3/id3lib_strings.h
@@ -30,6 +30,7 @@
#define _ID3LIB_STRINGS_H_
#include <string>
+#include <cstring>
#if (defined(__GNUC__) && (__GNUC__ >= 3) || (defined(_MSC_VER) && _MSC_VER > 1000))
namespace std
--- a/include/id3/writers.h
+++ b/include/id3/writers.h
@@ -30,7 +30,7 @@
#include "id3/writer.h"
#include "id3/id3lib_streams.h"
-//#include <string.h>
+#include <cstring>
class ID3_CPP_EXPORT ID3_OStreamWriter : public ID3_Writer
{

View File

@ -0,0 +1,37 @@
--- a/configure.in
+++ b/configure.in
@@ -227,7 +227,6 @@
)
AC_CHECK_HEADERS( \
string \
- iomanip.h \
,,AC_MSG_ERROR([Missing a vital header file for id3lib])
)
This patch adds a check for a null pointer
--- a/src/header_tag.cpp
+++ b/src/header_tag.cpp
@@ -54,7 +54,7 @@
{
size_t bytesUsed = ID3_TagHeader::SIZE;
- if (_info->is_extended)
+ if (_info && _info->is_extended)
{
bytesUsed += _info->extended_bytes;
}
This patch by Urs Fleisch prevents crashes when reading VBR MP3 file.
Index: id3lib3.8.3-3.8.3/src/mp3_parse.cpp
===================================================================
--- a/src/mp3_parse.cpp 2009-10-06 23:12:10.381250132 +0200
+++ b/src/mp3_parse.cpp 2009-10-06 23:14:09.545252591 +0200
@@ -465,7 +465,7 @@
// from http://www.xingtech.com/developer/mp3/
const size_t VBR_HEADER_MIN_SIZE = 8; // "xing" + flags are fixed
- const size_t VBR_HEADER_MAX_SIZE = 116; // frames, bytes, toc and scale are optional
+ const size_t VBR_HEADER_MAX_SIZE = 120; // frames, bytes, toc and scale are optional
if (mp3size >= vbr_header_offest + VBR_HEADER_MIN_SIZE)
{

View File

@ -0,0 +1,39 @@
diff -ruN id3lib-3.8.3.orig/ChangeLog id3lib-3.8.3/ChangeLog
--- id3lib-3.8.3.orig/ChangeLog 2003-03-02 01:23:00.000000000 +0100
+++ id3lib-3.8.3/ChangeLog 2006-02-22 00:33:59.946214472 +0100
@@ -1,3 +1,8 @@
+2006-02-17 Jerome Couderc
+
+ * Patch from Spoon to fix UTF-16 writing bug
+ http://sourceforge.net/tracker/index.php?func=detail&aid=1016290&group_id=979&atid=300979
+
2003-03-02 Sunday 17:38 Thijmen Klok <thijmen@id3lib.org>
* THANKS (1.20): added more people
diff -ruN id3lib-3.8.3.orig/src/io_helpers.cpp id3lib-3.8.3/src/io_helpers.cpp
--- id3lib-3.8.3.orig/src/io_helpers.cpp 2003-03-02 01:23:00.000000000 +0100
+++ id3lib-3.8.3/src/io_helpers.cpp 2006-02-22 00:35:02.926639992 +0100
@@ -363,11 +363,22 @@
// Write the BOM: 0xFEFF
unicode_t BOM = 0xFEFF;
writer.writeChars((const unsigned char*) &BOM, 2);
+ // Patch from Spoon : 2004-08-25 14:17
+ // http://sourceforge.net/tracker/index.php?func=detail&aid=1016290&group_id=979&atid=300979
+ // Wrong code
+ //for (size_t i = 0; i < size; i += 2)
+ //{
+ // unicode_t ch = (data[i] << 8) | data[i+1];
+ // writer.writeChars((const unsigned char*) &ch, 2);
+ //}
+ // Right code
+ unsigned char *pdata = (unsigned char *) data.c_str();
for (size_t i = 0; i < size; i += 2)
{
- unicode_t ch = (data[i] << 8) | data[i+1];
+ unicode_t ch = (pdata[i] << 8) | pdata[i+1];
writer.writeChars((const unsigned char*) &ch, 2);
}
+ // End patch
}
return writer.getCur() - beg;
}