From f6284be18d58d2a3ff81e8b0c7745aa62d488fdd Mon Sep 17 00:00:00 2001 From: itojun Date: Thu, 2 Dec 1999 03:32:19 +0000 Subject: fix buffer overflow in original distribution. --- x11/xmindpath/files/patch-sum | 3 ++- x11/xmindpath/patches/patch-ab | 20 ++++++++++++++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) create mode 100644 x11/xmindpath/patches/patch-ab (limited to 'x11') diff --git a/x11/xmindpath/files/patch-sum b/x11/xmindpath/files/patch-sum index b96d8a46b2f..92ab61df715 100644 --- a/x11/xmindpath/files/patch-sum +++ b/x11/xmindpath/files/patch-sum @@ -1,3 +1,4 @@ -$NetBSD: patch-sum,v 1.1.1.1 1999/10/28 04:21:40 jlam Exp $ +$NetBSD: patch-sum,v 1.2 1999/12/02 03:32:19 itojun Exp $ MD5 (patch-aa) = b47a6ee57d187d237f41e5ae416b4e2a +MD5 (patch-ab) = bebe051283d2c3f003b5bbd35b163ef9 diff --git a/x11/xmindpath/patches/patch-ab b/x11/xmindpath/patches/patch-ab new file mode 100644 index 00000000000..e9206d705cf --- /dev/null +++ b/x11/xmindpath/patches/patch-ab @@ -0,0 +1,20 @@ +$NetBSD: patch-ab,v 1.1 1999/12/02 03:32:21 itojun Exp $ +--- uucplock.c 1998/08/23 04:50:17 1.1 ++++ uucplock.c 1999/12/02 02:58:31 1.2 +@@ -55,7 +55,7 @@ + char tbuf[sizeof(_PATH_LOCKDIRNAME) + MAXNAMLEN]; + off_t lseek(); + +- (void)sprintf(tbuf, _PATH_LOCKDIRNAME, ttyname); ++ (void)snprintf(tbuf, sizeof(tbuf), _PATH_LOCKDIRNAME, ttyname); + fd = open(tbuf, O_RDWR|O_CREAT|O_EXCL, 0664); + if (fd < 0) { + /* +@@ -104,6 +104,6 @@ + { + char tbuf[sizeof(_PATH_LOCKDIRNAME) + MAXNAMLEN]; + +- (void)sprintf(tbuf, _PATH_LOCKDIRNAME, ttyname); ++ (void)snprintf(tbuf, sizeof(tbuf), _PATH_LOCKDIRNAME, ttyname); + return(unlink(tbuf)); + } -- cgit v1.2.3