Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files. =================================================================== RCS file: /ftp/cvs/cvsroot/src/lib/libc/gen/glob.c,v retrieving revision 1.12 retrieving revision 1.13 diff -u -p -r1.12 -r1.13 --- src/lib/libc/gen/glob.c 2005/09/13 01:44:09 1.12 +++ src/lib/libc/gen/glob.c 2005/09/13 21:38:03 1.13 @@ -1,4 +1,4 @@ -/* $NetBSD: glob.c,v 1.12 2005/09/13 01:44:09 christos Exp $ */ +/* $NetBSD: glob.c,v 1.13 2005/09/13 21:38:03 elad Exp $ */ /* * Copyright (c) 1989, 1993 @@ -37,7 +37,7 @@ #if 0 static char sccsid[] = "@(#)glob.c 8.3 (Berkeley) 10/13/93"; #else -__RCSID("$NetBSD: glob.c,v 1.12 2005/09/13 01:44:09 christos Exp $"); +__RCSID("$NetBSD: glob.c,v 1.13 2005/09/13 21:38:03 elad Exp $"); #endif #endif /* LIBC_SCCS and not lint */ @@ -581,7 +581,9 @@ glob1(pattern, pglob, limit) * 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)); }