diff options
| author | Sean Farley <scf@FreeBSD.org> | 2009-12-07 00:22:10 +0000 | 
|---|---|---|
| committer | Sean Farley <scf@FreeBSD.org> | 2009-12-07 00:22:10 +0000 | 
| commit | f959b43fd02012ab6b7d51a07ffe23a95b69bbac (patch) | |
| tree | 90368d65ccd7e5b91007abfeb4e2447a69e22ce8 /lib/libc/stdlib/getenv.c | |
| parent | a48eed8352e8094e3225ff2daa3c86800694c382 (diff) | |
Notes
Diffstat (limited to 'lib/libc/stdlib/getenv.c')
| -rw-r--r-- | lib/libc/stdlib/getenv.c | 9 | 
1 files changed, 6 insertions, 3 deletions
| diff --git a/lib/libc/stdlib/getenv.c b/lib/libc/stdlib/getenv.c index 4617f4551d9e..b7826d72a5d4 100644 --- a/lib/libc/stdlib/getenv.c +++ b/lib/libc/stdlib/getenv.c @@ -361,7 +361,8 @@ __build_env(void)  		} else {  			__env_warnx(CorruptEnvValueMsg, envVars[envNdx].name,  			    strlen(envVars[envNdx].name)); -			continue; +			errno = EFAULT; +			goto Failure;  		}  		/* @@ -376,7 +377,8 @@ __build_env(void)  		    false) == NULL) {  			__env_warnx(CorruptEnvFindMsg, envVars[envNdx].name,  			    nameLen); -			continue; +			errno = EFAULT; +			goto Failure;  		}  		envVars[activeNdx].active = true;  	} @@ -558,7 +560,8 @@ __merge_environ(void)  				if ((equals = strchr(*env, '=')) == NULL) {  					__env_warnx(CorruptEnvValueMsg, *env,  					    strlen(*env)); -					continue; +					errno = EFAULT; +					return (-1);  				}  				if (__setenv(*env, equals - *env, equals + 1,  				    1) == -1) | 
