diff options
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | openbsd-compat/glob.c | 7 |
2 files changed, 8 insertions, 4 deletions
@@ -1,5 +1,6 @@ | |||
1 | 20010320 | 1 | 20010320 |
2 | - (bal) glob.c update to added GLOB_LIMITS. | 2 | - (bal) glob.c update to added GLOB_LIMITS (OpenBSD CVS). |
3 | - (bal) glob.c update to set gl_pathv to NULL (OpenBSD CVS). | ||
3 | 4 | ||
4 | 20010319 | 5 | 20010319 |
5 | - (djm) Seed PRNG at startup, rather than waiting for arc4random calls to | 6 | - (djm) Seed PRNG at startup, rather than waiting for arc4random calls to |
@@ -4630,4 +4631,4 @@ | |||
4630 | - Wrote replacements for strlcpy and mkdtemp | 4631 | - Wrote replacements for strlcpy and mkdtemp |
4631 | - Released 1.0pre1 | 4632 | - Released 1.0pre1 |
4632 | 4633 | ||
4633 | $Id: ChangeLog,v 1.986 2001/03/19 18:58:13 mouring Exp $ | 4634 | $Id: ChangeLog,v 1.987 2001/03/19 19:00:09 mouring Exp $ |
diff --git a/openbsd-compat/glob.c b/openbsd-compat/glob.c index b42cedb79..3c3a19131 100644 --- a/openbsd-compat/glob.c +++ b/openbsd-compat/glob.c | |||
@@ -44,7 +44,7 @@ | |||
44 | #if 0 | 44 | #if 0 |
45 | static char sccsid[] = "@(#)glob.c 8.3 (Berkeley) 10/13/93"; | 45 | static char sccsid[] = "@(#)glob.c 8.3 (Berkeley) 10/13/93"; |
46 | #else | 46 | #else |
47 | static char rcsid[] = "$OpenBSD: glob.c,v 1.9 2001/03/18 17:18:58 deraadt Exp $"; | 47 | static char rcsid[] = "$OpenBSD: glob.c,v 1.10 2001/03/19 13:45:30 millert Exp $"; |
48 | #endif | 48 | #endif |
49 | #endif /* LIBC_SCCS and not lint */ | 49 | #endif /* LIBC_SCCS and not lint */ |
50 | 50 | ||
@@ -663,8 +663,10 @@ globextend(path, pglob, limitp) | |||
663 | pathv = pglob->gl_pathv ? realloc((char *)pglob->gl_pathv, newsize) : | 663 | pathv = pglob->gl_pathv ? realloc((char *)pglob->gl_pathv, newsize) : |
664 | malloc(newsize); | 664 | malloc(newsize); |
665 | if (pathv == NULL) { | 665 | if (pathv == NULL) { |
666 | if (pglob->gl_pathv) | 666 | if (pglob->gl_pathv) { |
667 | free(pglob->gl_pathv); | 667 | free(pglob->gl_pathv); |
668 | pglob->gl_pathv = NULL; | ||
669 | } | ||
668 | return(GLOB_NOSPACE); | 670 | return(GLOB_NOSPACE); |
669 | } | 671 | } |
670 | 672 | ||
@@ -761,6 +763,7 @@ globfree(pglob) | |||
761 | if (*pp) | 763 | if (*pp) |
762 | free(*pp); | 764 | free(*pp); |
763 | free(pglob->gl_pathv); | 765 | free(pglob->gl_pathv); |
766 | pglob->gl_pathv = NULL; | ||
764 | } | 767 | } |
765 | } | 768 | } |
766 | 769 | ||