Commit 00b3c78
Protect uses of select() from crash on too many file descriptors
The fd_set macros don't check for overflow and will cause an
out-of-bounds access when given a file description >= FD_SETSIZE (1024)
This doesn't fix the fundamental issue, but prevents a crash and should
allow partial functionality. The full fix requires switching to poll()
instead.
Signed-off-by: "Loren M. Lang" <loren.lang@intel.com>
Signed-off-by: Aaron Conole <aconole@redhat.com>1 parent 1e56468 commit 00b3c78
1 file changed
Lines changed: 27 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
180 | 180 | | |
181 | 181 | | |
182 | 182 | | |
| 183 | + | |
| 184 | + | |
| 185 | + | |
| 186 | + | |
| 187 | + | |
| 188 | + | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
| 193 | + | |
183 | 194 | | |
184 | 195 | | |
185 | 196 | | |
| |||
190 | 201 | | |
191 | 202 | | |
192 | 203 | | |
193 | | - | |
| 204 | + | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
| 208 | + | |
194 | 209 | | |
| 210 | + | |
195 | 211 | | |
196 | 212 | | |
197 | 213 | | |
| |||
205 | 221 | | |
206 | 222 | | |
207 | 223 | | |
| 224 | + | |
| 225 | + | |
| 226 | + | |
208 | 227 | | |
209 | 228 | | |
210 | 229 | | |
| |||
497 | 516 | | |
498 | 517 | | |
499 | 518 | | |
500 | | - | |
| 519 | + | |
| 520 | + | |
501 | 521 | | |
502 | 522 | | |
503 | 523 | | |
| |||
571 | 591 | | |
572 | 592 | | |
573 | 593 | | |
| 594 | + | |
| 595 | + | |
| 596 | + | |
| 597 | + | |
| 598 | + | |
574 | 599 | | |
575 | 600 | | |
576 | 601 | | |
| |||
0 commit comments