aerc

Working clone of aerc-mail.org
git clone git://git.danielmoch.com/aerc.git
Log | Files | Refs | README | LICENSE

commit 2dafe4b390c75df69c966530e8d9d9ba8a0a4601
parent a755608ef9d5893b68dc4c774bbda06503481552
Author: Drew DeVault <sir@cmpwn.com>
Date:   Thu, 16 May 2019 15:28:33 -0400

Fix issues with OOB uids

Diffstat:
Mlib/msgstore.go | 6+++---
1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/lib/msgstore.go b/lib/msgstore.go @@ -191,9 +191,9 @@ func (store *MessageStore) Update(msg types.WorkerMessage) { } uids := make([]uint32, len(store.Uids)-len(msg.Uids)) j := 0 - for i, uid := range store.Uids { - if _, deleted := toDelete[uid]; !deleted { - uids[j] = store.Uids[i] + for _, uid := range store.Uids { + if _, deleted := toDelete[uid]; !deleted && j < len(uids) { + uids[j] = uid j += 1 } }