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

Address parser hangs #212

Open
4k7 opened this issue Aug 13, 2020 · 2 comments
Open

Address parser hangs #212

4k7 opened this issue Aug 13, 2020 · 2 comments

Comments

@4k7
Copy link

4k7 commented Aug 13, 2020

Hi,

The address parser (mail/rfc5321/parse.go) hangs in some cases.

This code will hang.

package main

import (
	"github.com/flashmob/go-guerrilla/mail"
)


func main() {
	mail.NewAddress("test")
}

You need to fix next() function.

func (s *Parser) next() byte {
	if s.pos+1 < len(s.buf) {
		s.pos++
		s.ch = s.buf[s.pos]
	} else {
		s.ch = 0
	}
	return s.ch
}

Thanks.

@flashmob
Copy link
Owner

flashmob commented Aug 14, 2020 via email

@nullbio
Copy link

nullbio commented Dec 15, 2020

Is this merged anywhere? Getting hit by this bug as well, causing OOM system hangups.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants