diff options
author | Laurent Bercot <ska-skaware@skarnet.org> | 2018-09-17 18:21:53 +0000 |
---|---|---|
committer | Laurent Bercot <ska-skaware@skarnet.org> | 2018-09-17 18:21:53 +0000 |
commit | 9eaecb924f06c8aaa84e6c55580b00d3ee708442 (patch) | |
tree | 7cf45e5eafeef16ca2300cf6ebd147d37f820c7a /src | |
parent | 541aff174f51085c62060384431db15dab96d296 (diff) | |
download | skalibs-9eaecb924f06c8aaa84e6c55580b00d3ee708442.tar.xz |
bugfix: if HASGETPEERUCRED, getpeereid() had UB
Diffstat (limited to 'src')
-rw-r--r-- | src/libposixplz/getpeereid.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/libposixplz/getpeereid.c b/src/libposixplz/getpeereid.c index ae1142f..033a0af 100644 --- a/src/libposixplz/getpeereid.c +++ b/src/libposixplz/getpeereid.c @@ -38,7 +38,7 @@ int getpeereid (int s, uid_t *u, gid_t *g) int getpeereid (int s, uid_t *u, gid_t *g) { - ucred_t *cred ; + ucred_t *cred = 0 ; if (getpeerucred(s, &cred) == -1) return -1 ; *u = ucred_geteuid(cred) ; *g = ucred_getegid(cred) ; |