[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Nmh-workers] Artificial argv limits.

From: Paul Fox
Subject: Re: [Nmh-workers] Artificial argv limits.
Date: Mon, 26 Nov 2012 21:00:28 -0500

when i skimmed the code earlier, i was looking at all the uses of
MAXARGS -- many of which are used to size local arrays.  converting
them all to be dynamically-sized might be a fair amount of work.

but looking at rmm.c, refile.c, and folder_delmsgs(), i don't think
that issue applies.  the patch below fixes the problem, and makes
rmmproc and refile do the right thing (well, at least, the modern
thing).  NB: i didn't test to the limit where execvp should return

as for the rest of mh -- it's certainly possible to hit the MAXARGS
limit with other commands (show, for instance), but i suspect the
frequency is much lower, and those, too, can be fixed as needed.


>From 9636bc0e1697829966f51d2c301cd5d730c38c0a Mon Sep 17 00:00:00 2001
From: Paul Fox <address@hidden>
Date: Mon, 26 Nov 2012 20:49:55 -0500
Subject: [PATCH] rmm/refile: remove the MAXARGS limit when running rmmproc

 sbr/folder_delmsgs.c |    3 ---
 1 file changed, 3 deletions(-)

diff --git a/sbr/folder_delmsgs.c b/sbr/folder_delmsgs.c
index 6bde76f..c1416a6 100644
--- a/sbr/folder_delmsgs.c
+++ b/sbr/folder_delmsgs.c
@@ -40,9 +40,6 @@ folder_delmsgs (struct msgs *mp, int unlink_msgs, int nohook)
        /* Mark that the sequence information has changed */
        mp->msgflags |= SEQMOD;
-       if (mp->numsel > MAXARGS - 2)
-           adios (NULL, "more than %d messages for %s exec", MAXARGS - 2,
-                  rmmproc);
        vec = (char **) calloc ((size_t) (mp->numsel + 2), sizeof(*vec));
        if (vec == NULL)
            adios (NULL, "unable to allocate exec vector");

 paul fox, address@hidden (arlington, ma, where it's 30.4 degrees)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]