]> git.proxmox.com Git - mirror_ovs.git/blobdiff - lib/socket-util-unix.c
cirrus: Use FreeBSD 12.2.
[mirror_ovs.git] / lib / socket-util-unix.c
index 5d4b88c4a239449f8f991b0076dbfe48c4549185..59f63fcceb8782fc0ced210aac84dd390e23feaf 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Nicira, Inc.
+ * Copyright (c) 2014, 2016 Nicira, Inc.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -389,7 +389,7 @@ error:
 int
 get_unix_name_len(const struct sockaddr_un *sun, socklen_t sun_len)
 {
-    return (sun_len >= offsetof(struct sockaddr_un, sun_path) &&
+    return (sun_len > offsetof(struct sockaddr_un, sun_path) &&
             sun->sun_path[0] != 0
             ? sun_len - offsetof(struct sockaddr_un, sun_path)
             : 0);