diff options
author | Pablo Ruiz Garcia <pablo.ruiz@gmail.com> | 2011-11-28 02:17:10 +0400 |
---|---|---|
committer | Rodrigo Kumpera <kumpera@gmail.com> | 2011-12-28 15:54:12 +0400 |
commit | 0f632ac15a1b5cf434cb28ecbc093b6a6eab0621 (patch) | |
tree | 90d262e2cd10b1a5cf47910b03bb51ae5138c2e8 /mcs/class/I18N/Common | |
parent | f593a785184554c6d78b6230f387e84e76e8f520 (diff) |
Fixed a common buffer overflows to most I18N.Other.* encoders, by which mapping of invalid characters was emiting fallback character twice, thus doubling the amount of space required.
Fixed an CP949 encoding to avoid an off-by-one during character replacement on Getbytes(..)
Diffstat (limited to 'mcs/class/I18N/Common')
-rw-r--r-- | mcs/class/I18N/Common/MonoSafeEncoding.cs | 1 |
1 files changed, 0 insertions, 1 deletions
diff --git a/mcs/class/I18N/Common/MonoSafeEncoding.cs b/mcs/class/I18N/Common/MonoSafeEncoding.cs index 9b970a5d232..c7caf0f39dd 100644 --- a/mcs/class/I18N/Common/MonoSafeEncoding.cs +++ b/mcs/class/I18N/Common/MonoSafeEncoding.cs @@ -62,7 +62,6 @@ namespace I18N.Common if (buffer == null) buffer = EncoderFallback.CreateFallbackBuffer(); - // THIS IS WERE THE BUG IS!! (pruiz) if (charCount > 1 && (Char.IsSurrogate(chars[charIndex]) && Char.IsSurrogate(chars[charIndex + 1]))) { buffer.Fallback (chars[charIndex], chars[charIndex + 1], charIndex); |