From e2d9fdc3b06595aeeb7646c003e4356f369dc058 Mon Sep 17 00:00:00 2001 From: "ftang%netscape.com" Date: Fri, 6 Oct 2000 21:54:38 +0000 Subject: [PATCH] fix bug 54841. zero out the first 128 bits of the representatble r=sr=erik --- intl/uconv/ucvtw/nsUnicodeToBIG5NoAscii.cpp | 10 ++++++++++ intl/uconv/ucvtw/nsUnicodeToBIG5NoAscii.h | 1 + 2 files changed, 11 insertions(+) diff --git a/intl/uconv/ucvtw/nsUnicodeToBIG5NoAscii.cpp b/intl/uconv/ucvtw/nsUnicodeToBIG5NoAscii.cpp index 75abcb7d0e5..bf14103ad6f 100644 --- a/intl/uconv/ucvtw/nsUnicodeToBIG5NoAscii.cpp +++ b/intl/uconv/ucvtw/nsUnicodeToBIG5NoAscii.cpp @@ -52,3 +52,13 @@ NS_IMETHODIMP nsUnicodeToBIG5NoAscii::GetMaxLength(const PRUnichar * aSrc, *aDestLength = 2 * aSrcLength; return NS_OK_UENC_EXACTLENGTH; } +NS_IMETHODIMP nsUnicodeToBIG5NoAscii::FillInfo(PRUint32 *aInfo) +{ + nsresult rv = nsTableEncoderSupport::FillInfo(aInfo); // call the super class + if(NS_SUCCEEDED(rv)) + { + // mark the first 128 bits as 0. 4 x 32 bits = 128 bits + aInfo[0] = aInfo[1] = aInfo[2] = aInfo[3] = 0; + } + return rv; +} diff --git a/intl/uconv/ucvtw/nsUnicodeToBIG5NoAscii.h b/intl/uconv/ucvtw/nsUnicodeToBIG5NoAscii.h index a767212ea07..0011fb3da85 100644 --- a/intl/uconv/ucvtw/nsUnicodeToBIG5NoAscii.h +++ b/intl/uconv/ucvtw/nsUnicodeToBIG5NoAscii.h @@ -41,6 +41,7 @@ public: */ nsUnicodeToBIG5NoAscii(); + NS_IMETHOD FillInfo(PRUint32 *aInfo); protected: //--------------------------------------------------------------------