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:
4060a16
)
sd-daemon: verify NOTIFY_SOCKET path length
author
Lennart Poettering
<lennart@poettering.net>
Sun, 1 Nov 2015 20:49:19 +0000
(21:49 +0100)
committer
Sven Eden
<yamakuzure@gmx.net>
Wed, 26 Apr 2017 10:58:55 +0000
(12:58 +0200)
src/libelogind/sd-daemon/sd-daemon.c
patch
|
blob
|
history
diff --git
a/src/libelogind/sd-daemon/sd-daemon.c
b/src/libelogind/sd-daemon/sd-daemon.c
index e10444f498eae0efa71bb8a37e9642b704cc0b64..172409b73a3b7e4d04b9edfbfb4358badf610bd9 100644
(file)
--- a/
src/libelogind/sd-daemon/sd-daemon.c
+++ b/
src/libelogind/sd-daemon/sd-daemon.c
@@
-436,6
+436,11
@@
_public_ int sd_pid_notify_with_fds(pid_t pid, int unset_environment, const char
goto finish;
}
+ if (strlen(e) > sizeof(sockaddr.un.sun_path)) {
+ r = -EINVAL;
+ goto finish;
+ }
+
fd = socket(AF_UNIX, SOCK_DGRAM|SOCK_CLOEXEC, 0);
if (fd < 0) {
r = -errno;