Browse Source

fix crash on store without prior fetch with non-UIDPLUS servers

we'd never initialize the message list append pointer, so
imap_find_new_msgs()'s FETCH would go awry.

REFMAIL: <20140207101719.GB17125@mac.home>
1.1
Oswald Buddenhagen 11 years ago
parent
commit
3161540ab9
  1. 2
      src/drv_imap.c

2
src/drv_imap.c

@ -1818,6 +1818,7 @@ imap_select( store_t *gctx, int create,
free_generic_messages( gctx->msgs ); free_generic_messages( gctx->msgs );
gctx->msgs = 0; gctx->msgs = 0;
ctx->msgapp = &gctx->msgs;
if (prepare_box( &buf, ctx ) < 0) { if (prepare_box( &buf, ctx ) < 0) {
cb( DRV_BOX_BAD, aux ); cb( DRV_BOX_BAD, aux );
@ -1852,7 +1853,6 @@ imap_load( store_t *gctx, int minuid, int maxuid, int newuid, int *excs, int nex
} else { } else {
struct imap_cmd_refcounted_state *sts = imap_refcounted_new_state( cb, aux ); struct imap_cmd_refcounted_state *sts = imap_refcounted_new_state( cb, aux );
ctx->msgapp = &ctx->gen.msgs;
sort_ints( excs, nexcs ); sort_ints( excs, nexcs );
for (i = 0; i < nexcs; ) { for (i = 0; i < nexcs; ) {
for (bl = 0; i < nexcs && bl < 960; i++) { for (bl = 0; i < nexcs && bl < 960; i++) {

Loading…
Cancel
Save