diff options
author | Karl Williamson <khw@cpan.org> | 2020-03-07 13:01:39 -0700 |
---|---|---|
committer | Karl Williamson <khw@cpan.org> | 2020-03-18 18:18:20 -0600 |
commit | 88dca6b8c6142d704c674e1dc6ca6036154c4914 (patch) | |
tree | 719c719bd778d09c86bcc2d7edbbb45c8f603c24 /ext/File-Glob | |
parent | d848c629501c573e92befef804a2ebd1d7bd3def (diff) | |
download | perl-88dca6b8c6142d704c674e1dc6ca6036154c4914.tar.gz |
File-Glob/bsd_glob.c: use PerlEnv_getenv()
which has added protections beyond plain getenv()
Diffstat (limited to 'ext/File-Glob')
-rw-r--r-- | ext/File-Glob/bsd_glob.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/ext/File-Glob/bsd_glob.c b/ext/File-Glob/bsd_glob.c index 0d042b4afb..b038dd117a 100644 --- a/ext/File-Glob/bsd_glob.c +++ b/ext/File-Glob/bsd_glob.c @@ -457,7 +457,7 @@ globtilde(const Char *pattern, Char *patbuf, size_t patbuf_len, glob_t *pglob) * first and then trying the password file * or $USERPROFILE on DOSISH systems */ - if ((h = getenv("HOME")) == NULL) { + if ((h = PerlEnv_getenv("HOME")) == NULL) { #ifdef HAS_PASSWD struct passwd *pwd; if ((pwd = getpwuid(getuid())) == NULL) @@ -469,7 +469,7 @@ globtilde(const Char *pattern, Char *patbuf, size_t patbuf_len, glob_t *pglob) * When no passwd file, fallback to the USERPROFILE * environment variable on DOSish systems. */ - if ((h = getenv("USERPROFILE")) == NULL) { + if ((h = PerlEnv_getenv("USERPROFILE")) == NULL) { return pattern; } #else |