summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/socket/socket.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/socket/socket.c b/ext/socket/socket.c
index 6c0ed2f725d..7830a14e26f 100644
--- a/ext/socket/socket.c
+++ b/ext/socket/socket.c
@@ -1426,7 +1426,7 @@ sock_s_pack_sockaddr_un(VALUE self, VALUE path)
StringValue(path);
MEMZERO(&sockaddr, struct sockaddr_un, 1);
sockaddr.sun_family = AF_UNIX;
- if (sizeof(sockaddr.sun_path) <= RSTRING_LEN(path)) {
+ if (sizeof(sockaddr.sun_path) <= (size_t)RSTRING_LEN(path)) {
rb_raise(rb_eArgError, "too long unix socket path (%"PRIuSIZE" bytes given but %"PRIuSIZE" bytes max)",
(size_t)RSTRING_LEN(path), sizeof(sockaddr.sun_path));
}