skalibs

Mirror/fork of https://skarnet.org/software/skalibs/
git clone https://ccx.te2000.cz/git/skalibs
Log | Files | Refs | README | LICENSE

commit 9eaecb924f06c8aaa84e6c55580b00d3ee708442
parent 541aff174f51085c62060384431db15dab96d296
Author: Laurent Bercot <ska-skaware@skarnet.org>
Date:   Mon, 17 Sep 2018 18:21:53 +0000

 bugfix: if HASGETPEERUCRED, getpeereid() had UB

Diffstat:
Msrc/libposixplz/getpeereid.c | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 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) ;