Re: ezmlm-archive: fatal: out of memory
Bruce Guenter <[email protected]> Tue, 3 Jun 2008 17:39:45 -0600
| Newsgroups | gmane.mail.ezmlm |
|---|---|
| Message-ID | <[email protected]> |
On Thu, Feb 28, 2008 at 07:50:25PM +0100, Lars Kruse wrote: > when running ezmlm-archive (v6.0.1) on a list without archived messages, the > following error is displayed: > > ezmlm-archive: fatal: out of memory This is caused by an uninitialized variable in ezmlm-archive.c The attached patch fixes the problem. -- Bruce Guenter <[email protected]> http://untroubled.org/
ezmlm-archive.patch
(text/plain, 601 B)
--- a/ezmlm-archive.c
+++ b/ezmlm-archive.c
@@ -410,8 +410,8 @@ int main(int argc,char **argv)
/* and that the "num" message is final */
fdlock = lockfile("lock");
/* get num */
- getconf_ulong(&max,"num",0);
- if (max == 0)
+ if (!getconf_ulong(&max,"num",0);
+ || max == 0)
strerr_die1x(100,ERR_EMPTY_LIST);
(void) close(fdlock);
@@ -421,6 +421,8 @@ int main(int argc,char **argv)
if (!flagcreate && !archnum) { /* adjust archnum (from) / to */
if (getconf_ulong(&archnum,"archnum",0))
++archnum;
+ else
+ archnum = 0;
}
if (archnum > to)
signature.asc
(application/pgp-signature, 189 B)
-----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (GNU/Linux) iD8DBQFIRdZB6W+y3GmZgOgRAqOXAKCf+x885Sz2MWe2rapDrYn3IqrVYQCgiosr XU5HV8t6HbU42weIejTisGU= =C0b0 -----END PGP SIGNATURE-----