chiark
/
gitweb
/
~ianmdlvl
/
elogind.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
d7e3858
)
socket-util: fix getpeergroups() assert(fd) (#8080)
author
Vito Caputo
<vcaputo@pengaru.com>
Sat, 3 Feb 2018 11:09:08 +0000
(
03:09
-0800)
committer
Sven Eden
<yamakuzure@gmx.net>
Wed, 30 May 2018 05:53:59 +0000
(07:53 +0200)
Don't assert on zero-value fds.
Fixes #8075.
(cherry picked from commit
75f40779607ea79f20441c7fb46744d04ee2c7ae
)
src/basic/socket-util.c
patch
|
blob
|
history
diff --git
a/src/basic/socket-util.c
b/src/basic/socket-util.c
index d89136b01f7a373a2ec0742b6b374a5e689645f8..007b302e721acee91f8f2543d33082037981662c 100644
(file)
--- a/
src/basic/socket-util.c
+++ b/
src/basic/socket-util.c
@@
-1036,7
+1036,7
@@
int getpeergroups(int fd, gid_t **ret) {
socklen_t n = sizeof(gid_t) * 64;
_cleanup_free_ gid_t *d = NULL;
- assert(fd);
+ assert(fd
>= 0
);
assert(ret);
for (;;) {