FW: Patch for zic(8)
Olson, Arthur David (NIH/NCI)
olsona at dc37a.nci.nih.gov
Mon Feb 24 16:13:26 UTC 2003
Mike Heffner is not on the time zone mailing list; direct replies
appropriately.
Mike's fix is to a modified version of zic.c,
so it doesn't apply to the version archived at elsie.nci.nih.gov;
I'm sending it along for those of you who are using the modified version.
--ado
-----Original Message-----
From: Mike Heffner [mailto:mheffner at vt.edu]
Sent: Saturday, February 22, 2003 1:26 PM
To: wollman at freebsd.org; tz at lecserver.nci.nih.gov
Subject: Patch for zic(8)
Hi,
The attached patch prevents 'zic -m foobar' from segfaulting and also
fixes a memory leak. Can this be applied to FreeBSD's zic codebase or the
vendor codebase?
Thanks,
Mike
--
Mike Heffner <mheffner@[acm.]vt.edu>
<mikeh at FreeBSD.org>
Index: zic.c
===================================================================
RCS file: /cvs/ncvs/src/usr.sbin/zic/zic.c,v
retrieving revision 1.14
diff -u -r1.14 zic.c
--- zic.c 18 Jul 2001 11:27:04 -0000 1.14
+++ zic.c 22 Feb 2003 18:24:41 -0000
@@ -500,7 +500,11 @@
case 'm':
{
void *set = setmode(optarg);
+ if (set == NULL)
+ errx(EXIT_FAILURE,
+_("invalid file mode"));
getmode(set, mflag);
+ free(set);
break;
}
case 'p':
More information about the tz
mailing list