FreeBSD Bugzilla – Attachment 231010 Details for
Bug 261205
net/quagga: add some fixes to the port from upstream
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
patch-fdsetsize: fix memory corruption that may occur when limit.rlim_cur is less then FD_SETSIZE
patch-fdsetsize (text/plain), 784 bytes, created by
Eugene Grosbein
on 2022-01-14 19:36:43 UTC
(
hide
)
Description:
patch-fdsetsize: fix memory corruption that may occur when limit.rlim_cur is less then FD_SETSIZE
Filename:
MIME Type:
Creator:
Eugene Grosbein
Created:
2022-01-14 19:36:43 UTC
Size:
784 bytes
patch
obsolete
>--- lib/thread.c.orig 2018-03-30 18:53:43.537794946 +0200 >+++ lib/thread.c 2018-03-30 19:17:27.919629268 +0200 >@@ -531,7 +531,8 @@ thread_master_create () > return NULL; > } > >- rv->fd_limit = (int)limit.rlim_cur; >+ rv->fd_limit = ((int)limit.rlim_cur < FD_SETSIZE ? >+ (int)limit.rlim_cur : FD_SETSIZE); > rv->read = XCALLOC (MTYPE_THREAD, sizeof (struct thread *) * rv->fd_limit); > if (rv->read == NULL) > { >@@ -1187,7 +1188,7 @@ thread_fetch (struct thread_master *m) > timer_wait = timer_wait_bg; > } > >- num = fd_select (FD_SETSIZE, &readfd, &writefd, &exceptfd, timer_wait); >+ num = fd_select (m->fd_limit, &readfd, &writefd, &exceptfd, timer_wait); > > /* Signals should get quick treatment */ > if (num < 0)
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 261205
:
231009
| 231010 |
231011