summaryrefslogtreecommitdiff
path: root/net/tnftpd/patches/patch-aa
blob: 1fbddc2bac29490a2d608e5ab95f711e29c1a22e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
$NetBSD: patch-aa,v 1.3 2006/12/02 23:00:04 adrianp Exp $

--- libnetbsd/glob.c.orig	2003-12-15 12:18:43.000000000 +0000
+++ libnetbsd/glob.c
@@ -497,7 +497,9 @@ glob1(Char *pattern, glob_t *pglob, size
 	 * we save one character so that we can use ptr >= limit,
 	 * in the general case when we are appending non nul chars only.
 	 */
-	return(glob2(pathbuf, pathbuf, pathbuf + sizeof(pathbuf) - 1, pattern,
+	return(glob2(pathbuf, pathbuf,
+		     pathbuf + (sizeof(pathbuf) / sizeof(*pathbuf)) - 1,
+		     pattern,
 	    pglob, limit));
 }