X-Git-Url: http://git.marmaro.de/?p=mmh;a=blobdiff_plain;f=sbr%2Fseq_read.c;h=4cc42233c2629b70d9b10a5ec83cb8d293b7bb0c;hp=1fdccf96211d8d558919eabde3c0145f45b4b769;hb=a4ff68e851c0931ced437f73a1acb0fedb28bec3;hpb=04a3dfc70394a517a79340a7d3ecd9c6a23d0bee diff --git a/sbr/seq_read.c b/sbr/seq_read.c index 1fdccf9..4cc4223 100644 --- a/sbr/seq_read.c +++ b/sbr/seq_read.c @@ -76,6 +76,9 @@ seq_public(struct msgs *mp) /* Use m_getfld to scan sequence file */ for (state = FLD2;;) { switch (state = m_getfld2(state, &f, fp)) { + case LENERR2: + state = FLD2; + /* FALL */ case FLD2: seq_init(mp, mh_xstrdup(f.name), trimcpy(f.value)); continue; @@ -207,9 +210,14 @@ seq_init(struct msgs *mp, char *name, char *field) ** We iterate through messages in this range ** and flip on bit for this sequence. */ + if (k > mp->hghoff) { + if (!(mp = folder_realloc(mp, mp->lowoff, k))) { + adios(EX_OSERR, NULL, "unable to allocate folder storage"); + } + mp->hghoff = k; + } for (; j <= k; j++) { - if (j >= mp->lowmsg && j <= mp->hghmsg && - does_exist(mp, j)) + if (j >= mp->lowmsg && j <= mp->hghoff) add_sequence(mp, i, j); } }