Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/netbsd-2-1]: src/lib/libc/gen Pull up following revision(s) (requested b...



details:   https://anonhg.NetBSD.org/src/rev/9b6744faa92f
branches:  netbsd-2-1
changeset: 564244:9b6744faa92f
user:      bouyer <bouyer%NetBSD.org@localhost>
date:      Sat Dec 02 12:45:22 2006 +0000

description:
Pull up following revision(s) (requested by joerg in ticket #10789):
        lib/libc/gen/glob.c: revision 1.13 via patch
Don't overflow when DEBUG is defined.
PR/30833, from Tomas Skare.

diffstat:

 lib/libc/gen/__glob13.c |  8 +++++---
 1 files changed, 5 insertions(+), 3 deletions(-)

diffs (29 lines):

diff -r 5400f7528187 -r 9b6744faa92f lib/libc/gen/__glob13.c
--- a/lib/libc/gen/__glob13.c   Fri Nov 24 21:27:12 2006 +0000
+++ b/lib/libc/gen/__glob13.c   Sat Dec 02 12:45:22 2006 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: __glob13.c,v 1.25 2003/08/07 16:42:45 agc Exp $        */
+/*     $NetBSD: __glob13.c,v 1.25.8.1 2006/12/02 12:45:22 bouyer 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: __glob13.c,v 1.25 2003/08/07 16:42:45 agc Exp $");
+__RCSID("$NetBSD: __glob13.c,v 1.25.8.1 2006/12/02 12:45:22 bouyer Exp $");
 #endif
 #endif /* LIBC_SCCS and not lint */
 
@@ -583,7 +583,9 @@
         * 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));
 }
 



Home | Main Index | Thread Index | Old Index