projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
sockaddr's now require length (K. Sklower);
[unix-history]
/
usr
/
src
/
lib
/
libc
/
gen
/
getlogin.c
diff --git
a/usr/src/lib/libc/gen/getlogin.c
b/usr/src/lib/libc/gen/getlogin.c
index
4ce32ef
..
6159806
100644
(file)
--- a/
usr/src/lib/libc/gen/getlogin.c
+++ b/
usr/src/lib/libc/gen/getlogin.c
@@
-23,6
+23,8
@@
getlogin()
return (0);
}
close(uf);
return (0);
}
close(uf);
+ if (ubuf.ut_name[0] == '\0')
+ return (0);
ubuf.ut_name[sizeof (ubuf.ut_name)] = ' ';
for (cp = ubuf.ut_name; *cp++ != ' '; )
;
ubuf.ut_name[sizeof (ubuf.ut_name)] = ' ';
for (cp = ubuf.ut_name; *cp++ != ' '; )
;