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

GetDecoder() on an XMPP transport is called before Connect() #181

Open
bodqhrohro opened this issue May 23, 2022 · 2 comments
Open

GetDecoder() on an XMPP transport is called before Connect() #181

bodqhrohro opened this issue May 23, 2022 · 2 comments

Comments

@bodqhrohro
Copy link
Contributor

ERRO[0212] stream error: invalid-from

[ 3][t 0][1653306110.321923017][Client.cpp:291][&td_requests]   End to wait for updates, returning object 205 0x7fb9e43f8e50
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x1 addr=0x90 pc=0x1173bba]

goroutine 573 [running]:
encoding/xml.(*Decoder).Token(0x0, 0x10, 0xc0002bfcb8, 0xb9bf79, 0x20)
        /usr/lib/go-1.15/src/encoding/xml/xml.go:282 +0x3a
gosrc.io/xmpp/stanza.NextXmppToken(0x0, 0x7fba1c22b108, 0xc00038b8c0, 0x30, 0xc000366400)
        /home/bodqhrohro/go/pkg/mod/dev.narayana.im/narayana/[email protected]/stanza/parser.go:89 +0x45
gosrc.io/xmpp/stanza.NextPacket(0x0, 0x0, 0x0, 0xc000464690, 0xc0002bffc0)
         /home/bodqhrohro/go/pkg/mod/dev.narayana.im/narayana/[email protected]/stanza/parser.go:53 +0x45
gosrc.io/xmpp.(*Component).recv(0xc0001b0000)
        /home/bodqhrohro/go/pkg/mod/dev.narayana.im/narayana/[email protected]/component.go:128 +0x93
created by gosrc.io/xmpp.(*Component).Resume
        /home/bodqhrohro/go/pkg/mod/dev.narayana.im/narayana/[email protected]/component.go:104 +0xa0b
@initpwn
Copy link

initpwn commented Jun 13, 2022

Please help to reproduce this error.

@bodqhrohro
Copy link
Contributor Author

It was literally an invalid from in an outgoing stanza sent from my code (AFAIR, ending in @ with no server part).

The problem though is that stream errors should be handled more gracefully than a segmentation fault, I suppose.

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

2 participants