made safer
This commit is contained in:
parent
d24592ee76
commit
ac92c0b9c3
1 changed files with 1 additions and 0 deletions
|
@ -5,6 +5,7 @@ register char *name;
|
|||
extern char **environ;
|
||||
register char **v = environ, *p, *q;
|
||||
|
||||
if (v == 0 || name == 0) return 0;
|
||||
while ((p = *v++) != 0) {
|
||||
q = name;
|
||||
while (*q && *q++ == *p++) /* nothing */ ;
|
||||
|
|
Loading…
Reference in a new issue