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 <pgf@foxharp.boston.ma.us>
Date: Mon, 26 Nov 2012 20:49:55 -0500
Subject: [PATCH] rmm/refile: remove the MAXARGS limit when running rmmproc
/* 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");