Virtomize/mail2most

panic: runtime error: slice bounds out of range

Fmyschkin opened this issue · 3 comments

Describe the bug
Runtime Error: slice bounds out of range

To Reproduce
Steps to reproduce the behavior:

  1. Install version 1.8.1
  2. sudo ./mail2most conf/mail2most.conf
  3. See error

Release version
1.8.1

Architecture
Linux 64 Bit

Error Message
op.api2412@f1108:/opt/mail2most$ sudo ./mail2most -c conf/mail2most.conf
DEBU[2020-04-15T13:42:19+02:00] using logging method format=text output=stdout
DEBU[2020-04-15T13:42:19+02:00] mailserver server="ex.rubicon.eu:993" status=connected
DEBU[2020-04-15T13:42:19+02:00] checking folders folders="[Inbox/Testing]"
INFO[2020-04-15T13:42:19+02:00] processing mails folder=Inbox/Testing
DEBU[2020-04-15T13:42:19+02:00] searching unseen unseen=true
panic: runtime error: slice bounds out of range [:4294967295] with capacity 2

goroutine 1 [running]:
github.com/cseeger-epages/mail2most/lib.Mail2Most.GetMail(0xc000027280, 0x9, 0xa, 0xc0000272a8, 0x5, 0xc0000272d8, 0x4, 0xc000027350, 0xd, 0xc000027320, ...)
/home/cseeger/go/src/github.com/cseeger-epages/mail2most/lib/imap.go:88 +0x24a2
github.com/cseeger-epages/mail2most/lib.Mail2Most.Run(0xc000027280, 0x9, 0xa, 0xc0000272a8, 0x5, 0xc0000272d8, 0x4, 0xc000027350, 0xd, 0xc000027320, ...)
/home/cseeger/go/src/github.com/cseeger-epages/mail2most/lib/mail2most.go:61 +0x57e
main.main()
/home/cseeger/go/src/github.com/cseeger-epages/mail2most/main.go:19 +0x19f
op.api2412@f1108:/opt/mail2most$ sudo ./mail2most -c conf/mail2most.conf
DEBU[2020-04-15T13:46:46+02:00] using logging method format=text output=stdout
DEBU[2020-04-15T13:46:46+02:00] mailserver server="ex.rubicon.eu:993" status=connected
DEBU[2020-04-15T13:46:46+02:00] checking folders folders="[Inbox/Testing]"
INFO[2020-04-15T13:46:46+02:00] processing mails folder=Inbox/Testing
DEBU[2020-04-15T13:46:46+02:00] searching unseen unseen=true
panic: runtime error: slice bounds out of range [:4294967295] with capacity 1

goroutine 1 [running]:
github.com/cseeger-epages/mail2most/lib.Mail2Most.GetMail(0xc000027280, 0x9, 0xa, 0xc0000272a8, 0x5, 0xc0000272d8, 0x4, 0xc000027350, 0xd, 0xc000027320, ...)
/home/cseeger/go/src/github.com/cseeger-epages/mail2most/lib/imap.go:88 +0x24a2
github.com/cseeger-epages/mail2most/lib.Mail2Most.Run(0xc000027280, 0x9, 0xa, 0xc0000272a8, 0x5, 0xc0000272d8, 0x4, 0xc000027350, 0xd, 0xc000027320, ...)
/home/cseeger/go/src/github.com/cseeger-epages/mail2most/lib/mail2most.go:61 +0x57e
main.main()
/home/cseeger/go/src/github.com/cseeger-epages/mail2most/main.go:19 +0x19f

@Fmyschkin can you test if this problem persists with the latest release v1.11.0

Hi,
update to v1.11.0 solved the issue.

great :)