gecko-dev/intl
Nika Layzell aef919f890 Bug 1170668 - Improve short read handling in nsConverterInputStream, r=hsivonen
This patch changes how nsConverterInputStream handles passing data
through to the underlying unicode converter in order to make it more
reliably handle propagating errors and deal with short reads from the
underlying input stream.

This was done by making the code continuously read within the Fill
method until at least one character has been decoded from the input
stream, so that we don't spuriously communicate an EOF to the caller due
to a short read not producing enough bytes for the decoder to produce a
UTF-16 character.

In addition, while making this change it became easier to signal to
the decoder about the final read from the input stream, meaning that
partial characters at the end of the stream will now generate a
replacement character, rather than being ignored.

Differential Revision: https://phabricator.services.mozilla.com/D152682
2022-08-11 17:37:20 +00:00
..
benchmarks Bug 1782008 - Remove now unnecessary .eslintrc.js files. r=webcompat-reviewers,extension-reviewers,media-playback-reviewers,pip-reviewers,denschub,rpl,alwu,mossop 2022-08-03 11:16:20 +00:00
build
components Bug 1767961 - Part 4: Make TryCreateFromSkeleton a private method. r=platform-i18n-reviewers,dminor 2022-05-05 15:00:35 +00:00
docs
encoding_glue
gtest
hyphenation
icu Bug 1766220: Backport ICU-21994 to fix a potential heap buffer overflow. r=platform-i18n-reviewers,dminor 2022-04-25 16:34:42 +00:00
icu-patches Bug 1766220: Backport ICU-21994 to fix a potential heap buffer overflow. r=platform-i18n-reviewers,dminor 2022-04-25 16:34:42 +00:00
l10n Bug 1782008 - Remove now unnecessary .eslintrc.js files. r=webcompat-reviewers,extension-reviewers,media-playback-reviewers,pip-reviewers,denschub,rpl,alwu,mossop 2022-08-03 11:16:20 +00:00
locale Bug 1772006 - Part 5: Simplify and move the string searching APIs from ns[T]StringObsolete, r=xpcom-reviewers,necko-reviewers,eeejay,dragana,barret 2022-07-30 00:12:48 +00:00
locales
lwbrk Bug 1774865 - extra cleanup mozglue, security, intl and netwerk includes r=sylvestre 2022-06-22 09:51:52 +00:00
strres Bug 1772006 - Part 4: Simplify and move the string comparison APIs from ns[T]StringObsolete, r=xpcom-reviewers,necko-reviewers,dragana,barret 2022-07-30 00:12:48 +00:00
tzdata
uconv Bug 1170668 - Improve short read handling in nsConverterInputStream, r=hsivonen 2022-08-11 17:37:20 +00:00
unicharutil
Encoding.h
EncodingDetector.h
ICU4X.md
icu_sources_data.py
moz.build
update-icu4x.sh
update-icu.sh Bug 1766220: Backport ICU-21994 to fix a potential heap buffer overflow. r=platform-i18n-reviewers,dminor 2022-04-25 16:34:42 +00:00
update-tzdata.sh