From 83b3ac455bbc3f14440daecd809c22b6f58f752e Mon Sep 17 00:00:00 2001 From: Jonathan Kew Date: Tue, 13 Apr 2021 08:41:50 +0000 Subject: Always ensure teckit converter is reset after use. git-svn-id: svn://tug.org/texlive/trunk@58865 c570f23f-e606-0410-a88d-b1316a301751 --- Build/source/texk/web2c/xetexdir/XeTeX_ext.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Build/source/texk') diff --git a/Build/source/texk/web2c/xetexdir/XeTeX_ext.c b/Build/source/texk/web2c/xetexdir/XeTeX_ext.c index 4e7d113ad7a..9a182e0df2b 100644 --- a/Build/source/texk/web2c/xetexdir/XeTeX_ext.c +++ b/Build/source/texk/web2c/xetexdir/XeTeX_ext.c @@ -315,6 +315,7 @@ apply_normalization(uint32_t* buf, int len, int norm) status = TECkit_ConvertBuffer(*normPtr, (Byte*)buf, len * sizeof(UInt32), &inUsed, (Byte*)&buffer[first], sizeof(*buffer) * (bufsize - first), &outUsed, 1); + TECkit_ResetConverter(*normPtr); if (status != kStatus_NoError) buffer_overflow(); last = first + outUsed / sizeof(*buffer); @@ -693,6 +694,7 @@ applytfmfontmapping(void* cnv, int c) /* TECkit_Status status; */ /* status = */ TECkit_ConvertBuffer((TECkit_Converter)cnv, (const Byte*)&in, sizeof(in), &inUsed, out, sizeof(out), &outUsed, 1); + TECkit_ResetConverter((TECkit_Converter)cnv); if (outUsed < 1) return 0; else @@ -1754,6 +1756,7 @@ retry: status = TECkit_ConvertBuffer(cnv, (Byte*)txtPtr, txtLen * sizeof(UniChar), &inUsed, (Byte*)mappedtext, outLength, &outUsed, true); + TECkit_ResetConverter(cnv); switch (status) { case kStatus_NoError: -- cgit v1.2.3