artulab
projects
/
openbsd
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
252c2c0
)
Avoid a NULL dereference when getgrnam_r() returns NULL for `result'.
author
yasuoka
<yasuoka@openbsd.org>
Mon, 19 Oct 2015 07:58:28 +0000
(07:58 +0000)
committer
yasuoka
<yasuoka@openbsd.org>
Mon, 19 Oct 2015 07:58:28 +0000
(07:58 +0000)
usr.sbin/radiusd/radiusd_bsdauth.c
patch
|
blob
|
history
diff --git
a/usr.sbin/radiusd/radiusd_bsdauth.c
b/usr.sbin/radiusd/radiusd_bsdauth.c
index
b610a54
..
c7f8307
100644
(file)
--- a/
usr.sbin/radiusd/radiusd_bsdauth.c
+++ b/
usr.sbin/radiusd/radiusd_bsdauth.c
@@
-1,4
+1,4
@@
-/* $OpenBSD: radiusd_bsdauth.c,v 1.
4 2015/07/30 08:46:04
yasuoka Exp $ */
+/* $OpenBSD: radiusd_bsdauth.c,v 1.
5 2015/10/19 07:58:28
yasuoka Exp $ */
/*
* Copyright (c) 2015 YASUOKA Masahiko <yasuoka@yasuoka.net>
@@
-167,7
+167,7
@@
main(int argc, char *argv[])
pw = getpwnam(user);
if (getgrnam_r(group, &gr0, g_buf,
- sizeof(g_buf), &gr) == -1)
+ sizeof(g_buf), &gr) == -1
|| gr == NULL
)
goto group_done;
if (gr->gr_gid == pw->pw_gid) {