x/text: transform.String() can allocate unlimited memory when called with a buggy transformer returning ErrShortSrc #39490
Labels
FrozenDueToAge
NeedsInvestigation
Someone must examine and confirm this is a valid issue and not a duplicate of an existing one.
Milestone
Some
transform.Transformer
s are buggy and returnErrShortSrc
even when they shouldn't (e.g. whenatEOF = true
). When passed such a transformer,transform.String()
will allocate more and more memory until it runs out of memory and crashes. Due to a separate bug, UTF-16 decoder from the same library can behave in such way, so this code can be used to reproduce this bug:The text was updated successfully, but these errors were encountered: