diff options
author | Kay Sievers <kay.sievers@vrfy.org> | 2010-07-11 23:57:11 +0200 |
---|---|---|
committer | Kay Sievers <kay.sievers@vrfy.org> | 2010-07-11 23:57:11 +0200 |
commit | 35df38c36a65bd0a9fd108f7e10ea6a593d5cdd7 (patch) | |
tree | 79a240b50df22e14d3b9e20c7a201f7abe6e9671 /udev/udevd.c | |
parent | 4d32b441369bc3bff0b7ca5401077603b1977c0f (diff) |
udevd: init_notify() fix abstract namespace name handling
Diffstat (limited to 'udev/udevd.c')
-rw-r--r-- | udev/udevd.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/udev/udevd.c b/udev/udevd.c index e38c601649..873634fe45 100644 --- a/udev/udevd.c +++ b/udev/udevd.c @@ -1006,7 +1006,9 @@ static int init_notify(const char *state) memset(&msghdr, 0, sizeof(msghdr)); msghdr.msg_name = &sockaddr; - msghdr.msg_namelen = sizeof(struct sockaddr_un); + msghdr.msg_namelen = sizeof(sa_family_t) + strlen(e); + if (msghdr.msg_namelen > sizeof(struct sockaddr_un)) + msghdr.msg_namelen = sizeof(struct sockaddr_un); msghdr.msg_iov = &iovec; msghdr.msg_iovlen = 1; msghdr.msg_control = &control; |