Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/netbsd-1-4]: src/lib/libc/gen Pull up revision 1.21 (requested by christ...
details: https://anonhg.NetBSD.org/src/rev/9d7869914f57
branches: netbsd-1-4
changeset: 471282:9d7869914f57
user: he <he%NetBSD.org@localhost>
date: Wed Apr 04 15:54:47 2001 +0000
description:
Pull up revision 1.21 (requested by christos):
Globtilde buffer sentinel was off by a factor of 2.
diffstat:
lib/libc/gen/__glob13.c | 11 ++++++-----
1 files changed, 6 insertions(+), 5 deletions(-)
diffs (46 lines):
diff -r 21fe5bd38c77 -r 9d7869914f57 lib/libc/gen/__glob13.c
--- a/lib/libc/gen/__glob13.c Sun Apr 01 16:13:33 2001 +0000
+++ b/lib/libc/gen/__glob13.c Wed Apr 04 15:54:47 2001 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: __glob13.c,v 1.10.2.1 2001/04/01 16:07:40 he Exp $ */
+/* $NetBSD: __glob13.c,v 1.10.2.2 2001/04/04 15:54:47 he Exp $ */
/*
* Copyright (c) 1989, 1993
@@ -41,7 +41,7 @@
#if 0
static char sccsid[] = "@(#)glob.c 8.3 (Berkeley) 10/13/93";
#else
-__RCSID("$NetBSD: __glob13.c,v 1.10.2.1 2001/04/01 16:07:40 he Exp $");
+__RCSID("$NetBSD: __glob13.c,v 1.10.2.2 2001/04/04 15:54:47 he Exp $");
#endif
#endif /* LIBC_SCCS and not lint */
@@ -171,7 +171,7 @@
static int glob3 __P((Char *, Char *, Char *, Char *, glob_t *,
size_t *));
static int globextend __P((const Char *, glob_t *, size_t *));
-static const Char * globtilde __P((const Char *, Char *, size_t, glob_t *));
+static const Char *globtilde __P((const Char *, Char *, size_t, glob_t *));
static int globexp1 __P((const Char *, glob_t *));
static int globexp2 __P((const Char *, const Char *, glob_t *, int *));
static int match __P((Char *, Char *, Char *));
@@ -385,7 +385,7 @@
const Char *p;
Char *b;
char *d;
- Char *pend = &patbuf[patsize];
+ Char *pend = &patbuf[patsize / sizeof(Char)];
pend--;
@@ -468,7 +468,8 @@
_DIAGASSERT(pattern != NULL);
_DIAGASSERT(pglob != NULL);
- if ((qpatnext = globtilde(pattern, patbuf, sizeof(patbuf), pglob)) == NULL)
+ if ((qpatnext = globtilde(pattern, patbuf, sizeof(patbuf),
+ pglob)) == NULL)
return GLOB_ABEND;
oldpathc = pglob->gl_pathc;
bufnext = patbuf;
Home |
Main Index |
Thread Index |
Old Index