diff options
Diffstat (limited to 'src/shared')
-rw-r--r-- | src/shared/socket-util.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/shared/socket-util.c b/src/shared/socket-util.c index deecce8a80..a4e26b1d8c 100644 --- a/src/shared/socket-util.c +++ b/src/shared/socket-util.c @@ -349,6 +349,10 @@ bool socket_address_equal(const SocketAddress *a, const SocketAddress *b) { break; case AF_UNIX: + if (a->size <= offsetof(struct sockaddr_un, sun_path) || + b->size <= offsetof(struct sockaddr_un, sun_path)) + return false; + if ((a->sockaddr.un.sun_path[0] == 0) != (b->sockaddr.un.sun_path[0] == 0)) return false; |