summaryrefslogtreecommitdiff
path: root/ext/socket/ancdata.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/socket/ancdata.c')
-rw-r--r--ext/socket/ancdata.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/ext/socket/ancdata.c b/ext/socket/ancdata.c
index 168f70c311..8fcd53c9fb 100644
--- a/ext/socket/ancdata.c
+++ b/ext/socket/ancdata.c
@@ -1465,7 +1465,7 @@ bsock_recvmsg_internal(VALUE sock,
int gc_done = 0;
#endif
- maxdatlen = NUM2SIZET(vmaxdatlen);
+ maxdatlen = NIL_P(vmaxdatlen) ? 4061 : NUM2SIZET(vmaxdatlen);
#if defined(HAVE_STRUCT_MSGHDR_MSG_CONTROL)
maxctllen = NIL_P(vmaxctllen) ? 4096 : NUM2SIZET(vmaxctllen);
#else