openbsd-ports/mail/dovecot/patches/patch-src_lib-index_mail-index-sync-update_c
pea fe29c7c3f5 Some fixes from upstream:
- imap: Fixed a memory leak in ESEARCH.
- imap/pop3-login: Don't crash if passdb returns proxy field without host.
- lib-index: Added a missing sanity check for expunge-guid record's uid.
  This fixes a non-self healing assert-crash.
- master: Delete also pipes from login_dir (left by v2.0).

From Brad (maintainer), ok ajacoutot@
2011-01-04 13:59:17 +00:00

21 lines
670 B
Plaintext

$OpenBSD: patch-src_lib-index_mail-index-sync-update_c,v 1.1 2011/01/04 13:59:17 pea Exp $
--- src/lib-index/mail-index-sync-update.c.orig Sun Dec 5 18:18:06 2010
+++ src/lib-index/mail-index-sync-update.c Sun Dec 5 18:18:45 2010
@@ -528,8 +528,15 @@ int mail_index_sync_record(struct mail_index_sync_map_
break;
}
end = CONST_PTR_OFFSET(data, hdr->size);
- for (; rec != end; rec++)
+ for (; rec != end; rec++) {
+ if (rec->uid == 0) {
+ mail_index_sync_set_corrupted(ctx,
+ "Expunge-guid for invalid uid=%u",
+ rec->uid);
+ break;
+ }
sync_expunge(ctx, rec->uid, rec->uid);
+ }
break;
}
case MAIL_TRANSACTION_FLAG_UPDATE: {