Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

html: Unbounded buffering during tokenization #7053

Closed
CSEMike opened this issue Jan 2, 2014 · 1 comment
Closed

html: Unbounded buffering during tokenization #7053

CSEMike opened this issue Jan 2, 2014 · 1 comment

Comments

@CSEMike
Copy link

@CSEMike CSEMike commented Jan 2, 2014

The go.net/html tokenizer does not limit buffering. For example, the following program
will crash OOM:

    pr, pw := io.Pipe()
    z := NewTokenizer(pr)
    go z.Next()
    pw.Write([]byte("<"))
    b := []byte(strings.Repeat("t", 1024*1024))
    for {
        pw.Write(b)
    }

To improve robustness, the tokenizer should limit buffering.
@bradfitz
Copy link
Contributor

@bradfitz bradfitz commented Jan 3, 2014

Comment 1:

This issue was closed by revision golang/net@384e4d2.

Status changed to Fixed.

Loading

@CSEMike CSEMike added the fixed label Jan 3, 2014
@mikioh mikioh added repo-net and removed repo-net labels Dec 23, 2014
@mikioh mikioh changed the title go.net/html: Unbounded buffering during tokenization html: Unbounded buffering during tokenization Jan 4, 2015
@golang golang locked and limited conversation to collaborators Jun 25, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants