Address parser hangs
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.
Thanks!
On Thu, 13 Aug 2020, 11:09 int01, [email protected] wrote:
Hi,
The address parser (mail/rfc5321/parse.go) hangs in some cases.
This code will hangs.
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.
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/flashmob/go-guerrilla/issues/212, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAE6MPZPUIK2IF6JOVLFMPTSANDMNANCNFSM4P5TURRA .
Is this merged anywhere? Getting hit by this bug as well, causing OOM system hangups.