Bug 199097 - Make sure to check for file descriptor value before using FD_CLR
Summary: Make sure to check for file descriptor value before using FD_CLR
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: WebRTC (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: youenn fablet
URL:
Keywords: InRadar
Depends on:
Blocks:
 
Reported: 2019-06-20 19:05 PDT by youenn fablet
Modified: 2019-06-21 10:12 PDT (History)
4 users (show)

See Also:


Attachments
Patch (3.93 KB, patch)
2019-06-20 19:12 PDT, youenn fablet
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description youenn fablet 2019-06-20 19:05:01 PDT
Make sure to check for file descriptor value before using FD_CLR
Comment 1 youenn fablet 2019-06-20 19:05:25 PDT
<rdar://problem/51479074>
Comment 2 youenn fablet 2019-06-20 19:12:37 PDT
Created attachment 372609 [details]
Patch
Comment 3 Eric Carlson 2019-06-21 09:43:18 PDT
Comment on attachment 372609 [details]
Patch

Is it worth adding a GetDescriptor() check in ProcessEvents, or is getsockopt() with an invalid file descriptor harmless?
Comment 4 youenn fablet 2019-06-21 10:06:31 PDT
(In reply to Eric Carlson from comment #3)
> Comment on attachment 372609 [details]
> Patch
> 
> Is it worth adding a GetDescriptor() check in ProcessEvents, or is
> getsockopt() with an invalid file descriptor harmless?

I think this is fine, ProcessEvents should only be called with a dispatcher with a valid descriptor.
Comment 5 WebKit Commit Bot 2019-06-21 10:12:42 PDT
Comment on attachment 372609 [details]
Patch

Clearing flags on attachment: 372609

Committed r246682: <https://trac.webkit.org/changeset/246682>
Comment 6 WebKit Commit Bot 2019-06-21 10:12:44 PDT
All reviewed patches have been landed.  Closing bug.