Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F146894377
D433.1781447865.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
972 B
Referenced Files
None
Subscribers
None
D433.1781447865.diff
View Options
Index: sys/kern/uipc_socket.c
===================================================================
--- sys/kern/uipc_socket.c
+++ sys/kern/uipc_socket.c
@@ -2547,8 +2547,11 @@
error = EDOM;
goto bad;
}
+ if (tv.tv_sec > INT32_MAX) {
+ tv.tv_sec = INT32_MAX;
+ tv.tv_usec = 0;
+ }
val = tvtosbt(tv);
-
switch (sopt->sopt_name) {
case SO_SNDTIMEO:
so->so_snd.sb_timeo = val;
@@ -2698,10 +2701,8 @@
case SO_SNDTIMEO:
case SO_RCVTIMEO:
- optval = (sopt->sopt_name == SO_SNDTIMEO ?
- so->so_snd.sb_timeo : so->so_rcv.sb_timeo);
-
- tv = sbttotv(optval);
+ tv = sbttotv(sopt->sopt_name == SO_SNDTIMEO ?
+ so->so_snd.sb_timeo : so->so_rcv.sb_timeo);
#ifdef COMPAT_FREEBSD32
if (SV_CURPROC_FLAG(SV_ILP32)) {
struct timeval32 tv32;
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sun, Jun 14, 2:37 PM (3 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28901395
Default Alt Text
D433.1781447865.diff (972 B)
Attached To
Mode
D433: Fix getsockopt() timeout.
Attached
Detach File
Event Timeline
Log In to Comment