aerc/lib
Kiril Vladimiroff d9a0522780 Break early when delete happens in outdated state
A panic could happen when multiple delete messages are sent one after
another without waiting until there are no messages left to be deleted:

	panic: runtime error: makeslice: len out of range

	goroutine 1 [running]:
	git.sr.ht/~sircmpwn/aerc/lib.(*MessageStore).Update(0xc000592e00, 0xa8fe60, 0xc0003340f0)
		/go/src/git.sr.ht/~sircmpwn/aerc/lib/msgstore.go:222 +0x5b8
	git.sr.ht/~sircmpwn/aerc/widgets.(*AccountView).onMessage(0xc0000a0460, 0xa8fe60, 0xc0003340f0)
		/go/src/git.sr.ht/~sircmpwn/aerc/widgets/account.go:251 +0x307
	git.sr.ht/~sircmpwn/aerc/widgets.(*AccountView).Tick(0xc0000a0460, 0xc0001496b0)
		/go/src/git.sr.ht/~sircmpwn/aerc/widgets/account.go:90 +0xa1
	git.sr.ht/~sircmpwn/aerc/widgets.(*Aerc).Tick(0xc0000a9f40, 0xc000020501)
		/go/src/git.sr.ht/~sircmpwn/aerc/widgets/aerc.go:123 +0x91
	main.main()
		/go/src/git.sr.ht/~sircmpwn/aerc/aerc.go:182 +0x5bf

The make that blows up is:

	uids := make([]uint32, len(store.uids)-len(msg.Uids))

This change simply checks whether the make is going to be valid before
starting to work on the actual delete. If there are more messages queued
to be deleted than what's left in the store, then we're obviously in an
inconsistent state, ask for an update and break.
2019-12-12 12:29:39 -05:00
..
format Fix crash if there is no to address for %F 2019-11-25 11:49:46 -05:00
sort Preserve sorting order in search results 2019-10-09 19:46:43 -04:00
templates Correct capitalization in quoted_reply 2019-11-10 13:36:25 -05:00
ui Add UI options to save/pipe messages with unsupported mimetypes 2019-11-17 13:19:13 -05:00
uidstore Create UIDStore package 2019-07-12 11:09:47 -04:00
dirstore.go Move msgstore map to dirstore 2019-07-26 14:15:27 -04:00
history.go Add command history and cycling 2019-07-26 14:29:34 -04:00
msgstore.go Break early when delete happens in outdated state 2019-12-12 12:29:39 -05:00
oauthbearer.go Support imaps with oauthbearer authentication (Gmail) 2019-07-11 19:36:14 -04:00
open.go Use "open" instead of "xdg-open" on Darwin systems 2019-07-04 10:58:33 -04:00
open_darwin.go Use "open" instead of "xdg-open" on Darwin systems 2019-07-04 10:58:33 -04:00
socket.go Print success to socket if no error was thrown 2019-09-29 12:36:34 -04:00