2dabb7225e
The UTF-8 decoder processes the input bytes in chunks of 1024 bytes. It had the assumption that processing a chunk can at most yield 1024 UTF-16 code units. But the previous chunk may have had an uninished unicode point that will (when finished in the next chunk) need to be encoded as 2 UTF-16 code units. So decoding a 1024 byte chunk may yield 1025 UTF-16 code units. => Ensure the fixed buffer can hold 1025 UTF-16 code units. Closes https://github.com/flutter/flutter/issues/180942 Change-Id: I53bb5b96647d84205153c0df6d468f2e77acef41 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/475042 Reviewed-by: Ömer Ağacan <omersa@google.com> Commit-Queue: Martin Kustermann <kustermann@google.com>