Fix a one-byte buffer overflow reported by Tim Donahue
<tdonahue@vonmail.vonworldwide.com> and a very wrong type conversion.
This commit is contained in:
parent
8c34fcfac1
commit
db65ac5a61
@ -1,8 +1,9 @@
|
||||
# $OpenBSD: Makefile,v 1.17 2004/12/22 11:48:32 alek Exp $
|
||||
# $OpenBSD: Makefile,v 1.18 2006/05/27 16:54:16 naddy Exp $
|
||||
|
||||
COMMENT= "nice X11-based calendar/scheduling tool (using XView)"
|
||||
|
||||
DISTNAME= calentool-2.3
|
||||
PKGNAME= ${DISTNAME}p0
|
||||
CATEGORIES= misc x11
|
||||
|
||||
MASTER_SITES = http://www.darwinsys.com/freeware/
|
||||
|
@ -1,12 +1,20 @@
|
||||
$OpenBSD: patch-utils_c,v 1.1 2003/06/18 02:48:00 avsm Exp $
|
||||
--- utils.c.orig Wed Sep 30 03:38:24 1998
|
||||
+++ utils.c Wed Jun 18 03:41:50 2003
|
||||
@@ -170,7 +170,7 @@ get_today()
|
||||
$OpenBSD: patch-utils_c,v 1.2 2006/05/27 16:54:16 naddy Exp $
|
||||
--- utils.c.orig Wed Sep 30 04:38:24 1998
|
||||
+++ utils.c Sat May 27 18:11:00 2006
|
||||
@@ -164,13 +164,15 @@ get_today()
|
||||
#ifndef CALENCHECK
|
||||
char timstr[16];
|
||||
#endif
|
||||
+ time_t t;
|
||||
|
||||
#ifdef SVR4
|
||||
gettimeofday(&tv);
|
||||
#else
|
||||
gettimeofday(&tv, 0);
|
||||
#endif
|
||||
- tm = localtime(&tv.tv_sec);
|
||||
+ tm = localtime((time_t*)&tv.tv_sec);
|
||||
+ t = tv.tv_sec;
|
||||
+ tm = localtime(&t);
|
||||
|
||||
today = *tm;
|
||||
|
||||
|
12
misc/calentool/patches/patch-wpaint_c
Normal file
12
misc/calentool/patches/patch-wpaint_c
Normal file
@ -0,0 +1,12 @@
|
||||
$OpenBSD: patch-wpaint_c,v 1.1 2006/05/27 16:54:16 naddy Exp $
|
||||
--- wpaint.c.orig Sat May 27 18:32:52 2006
|
||||
+++ wpaint.c Sat May 27 18:35:16 2006
|
||||
@@ -179,7 +179,7 @@ paint_week_trim()
|
||||
{
|
||||
int i, x, y, rightx;
|
||||
int cwidth;
|
||||
- char c[8];
|
||||
+ char c[9];
|
||||
|
||||
cwidth = xv_get(font, FONT_DEFAULT_CHAR_WIDTH);
|
||||
First = current;
|
Loading…
x
Reference in New Issue
Block a user