Subject: CVS commit: pkgsrc/x11
From: Ignatios Souvatzis
Date: 2012-10-15 17:29:11
Message id: 20121015152912.70CD4175DD@cvs.netbsd.org

Log Message:
xlock -mode dclock would segfault on OSes with sizeof(time_t)>sizeof(long);
this includes NetBSD-6 on 32bit systems.

As a result, xlock -mode random (the default) would eventually unlock
the screen, without the user being aware of this (as she/he's can be
presumed to have left the monitor).

The reason was that some variables in dclock.c were declared long, but
contain essentially time_t values. In on case, a pointer to such a
variable was casted to (struct time_t *) and passed to localtime(),
and the resulting pointer is not checked for error before being used.

The variables have been changed to time_t and the typecast has been
removed.

Files:
RevisionActionfile
1.100modifypkgsrc/x11/xlockmore/Makefile
1.49modifypkgsrc/x11/xlockmore/distinfo
1.16modifypkgsrc/x11/xlockmore-lite/Makefile
1.1addpkgsrc/x11/xlockmore/patches/patch-modes_dclock.c