[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated
From: |
Ken Hornstein |
Subject: |
[Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. c915e11a95bdfb6157eecc81c5df82de65c86796 |
Date: |
Fri, 23 Mar 2012 03:59:20 +0000 |
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The nmh Mail Handling System".
The branch, master has been updated
via c915e11a95bdfb6157eecc81c5df82de65c86796 (commit)
from f423b06bf5ab4a966b17857f027a46e74447f438 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
http://git.savannah.gnu.org/cgit/nmh.git/commit/?id=c915e11a95bdfb6157eecc81c5df82de65c86796
commit c915e11a95bdfb6157eecc81c5df82de65c86796
Author: Ken Hornstein <address@hidden>
Date: Thu Mar 22 23:34:08 2012 -0400
If the number of messages in a folder is zero, then don't try to
clear out the sequence list; this can cause you to run off the
beginning of the malloc'd buffer. This can happen when you use
"comp" with a draft folder, the draft folder is empty, and you have
a previous sequence set in your .mh_profile. As far as I can tell
this has been a problem for nearly forever, but I only ran into it
recently when adding the readline support. Go figure.
diff --git a/sbr/seq_add.c b/sbr/seq_add.c
index 0bdcfdf..d5109b0 100644
--- a/sbr/seq_add.c
+++ b/sbr/seq_add.c
@@ -67,7 +67,7 @@ seq_addsel (struct msgs *mp, char *cp, int public, int zero)
* If sequence is new, or zero flag is set, then first
* clear the bit for this sequence from all messages.
*/
- if (new_seq || zero) {
+ if ((new_seq || zero) && mp->nummsg > 0) {
for (msgnum = mp->lowmsg; msgnum <= mp->hghmsg; msgnum++)
clear_sequence (mp, i, msgnum);
}
@@ -159,7 +159,7 @@ seq_addmsg (struct msgs *mp, char *cp, int msgnum, int
public, int zero)
* If sequence is new, or zero flag is set, then first
* clear the bit for this sequence from all messages.
*/
- if (new_seq || zero) {
+ if ((new_seq || zero) && mp->nummsg > 0) {
for (j = mp->lowmsg; j <= mp->hghmsg; j++)
clear_sequence (mp, i, j);
}
-----------------------------------------------------------------------
Summary of changes:
sbr/seq_add.c | 4 ++--
1 files changed, 2 insertions(+), 2 deletions(-)
hooks/post-receive
--
The nmh Mail Handling System
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Nmh-commits] [SCM] The nmh Mail Handling System branch, master, updated. c915e11a95bdfb6157eecc81c5df82de65c86796,
Ken Hornstein <=