From: Paul Fox Date: Tue, 27 Nov 2012 02:00:28 +0000 (-0500) Subject: Artificial argv limits. X-Git-Url: http://git.marmaro.de/?a=commitdiff_plain;ds=sidebyside;h=e99573743b82d936081e56f59e5881d53b4fed91;p=mmh Artificial argv limits. 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 E2BIG. 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. paul >From 9636bc0e1697829966f51d2c301cd5d730c38c0a Mon Sep 17 00:00:00 2001 From: Paul Fox Date: Mon, 26 Nov 2012 20:49:55 -0500 Subject: [PATCH] rmm/refile: remove the MAXARGS limit when running rmmproc --- 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");