~sircmpwn/aerc2#117: 
crash on trying to view message


goroutine 1 [running]:
git.sr.ht/~sircmpwn/aerc/widgets.NewPartViewer(0xc0001327e0, 0xc0000da0c0, 0xc0000a9c80, 0xc00029d3b0, 0xc0000a3fe8, 0x1, 0x1, 0x1, 0x30, 0x80a240)
	/home/grayhatter/code/aerc/widgets/msgviewer.go:335 +0xa55
git.sr.ht/~sircmpwn/aerc/widgets.enumerateParts(0xc0001327e0, 0xc0000da0c0, 0xc0000a9c80, 0xc00029d2c0, 0xc17e10, 0x0, 0x0, 0x8cec80, 0x406c6f, 0xc000052b28, ...)
	/home/grayhatter/code/aerc/widgets/msgviewer.go:168 +0x13f
git.sr.ht/~sircmpwn/aerc/widgets.NewMessageViewer(0xc0000ac370, 0xc0001327e0, 0xc0000da0c0, 0xc0000a9c80, 0xc00009be98)
	/home/grayhatter/code/aerc/widgets/msgviewer.go:113 +0x5ef
git.sr.ht/~sircmpwn/aerc/commands/account.ViewMessage(0xc000173490, 0xc00048c020, 0x1, 0x1, 0xc0000ae8e0, 0x1)
	/home/grayhatter/code/aerc/commands/account/view.go:27 +0x141
git.sr.ht/~sircmpwn/aerc/commands.(*Commands).ExecuteCommand(0xc0000a6160, 0xc000173490, 0xc0000a3f78, 0x4, 0x3, 0xc000052cc8)
	/home/grayhatter/code/aerc/commands/commands.go:47 +0x139
main.main.func1(0xc0000a3f78, 0x4, 0x3, 0x4)
	/home/grayhatter/code/aerc/aerc.go:84 +0xca
git.sr.ht/~sircmpwn/aerc/widgets.(*Aerc).BeginExCommand.func1(0xc0000a3f78, 0x4)
	/home/grayhatter/code/aerc/widgets/aerc.go:274 +0x58
git.sr.ht/~sircmpwn/aerc/widgets.(*ExLine).Event(0xc0005b5200, 0x8cf200, 0xc00023e1a0, 0xc00023e1a0)
	/home/grayhatter/code/aerc/widgets/exline.go:47 +0x12f
git.sr.ht/~sircmpwn/aerc/widgets.(*Aerc).Event(0xc000173490, 0x8cf200, 0xc00023e1a0, 0xc0000a3f01)
	/home/grayhatter/code/aerc/widgets/aerc.go:141 +0x41a
git.sr.ht/~sircmpwn/aerc/widgets.(*Aerc).simulate(0xc000173490, 0xc0000d9000, 0x6, 0x8)
	/home/grayhatter/code/aerc/widgets/aerc.go:134 +0x9b
git.sr.ht/~sircmpwn/aerc/widgets.(*Aerc).Event(0xc000173490, 0x8cf200, 0xc00022c000, 0xc000178c00)
	/home/grayhatter/code/aerc/widgets/aerc.go:156 +0x34b
git.sr.ht/~sircmpwn/aerc/lib/ui.(*UI).Tick(0xc0000ac410, 0x869d00)
	/home/grayhatter/code/aerc/lib/ui/ui.go:86 +0xc9
main.main()
	/home/grayhatter/code/aerc/aerc.go:113 +0x34b
Status
RESOLVED FIXED
Submitter
~grayhatter
Assigned to
No-one
Submitted
2 years ago
Updated
2 years ago
Labels
bug

~grayhatter 2 years ago

Fixed by deleting all config files and starting over

¯_(ツ)_/¯

In msgviewer.go@NewPartViewer; with bad configurations conf.Viewer.Pager can be [], thus cmd[1:] is an out of bounds read.

	cmd, err := shlex.Split(conf.Viewer.Pager)
	if err != nil {
		return nil, err
	}

	pager = exec.Command(cmd[0], cmd[1:]...)

~sircmpwn REPORTED FIXED 2 years ago

Register here or Log in to comment, or comment via email.