Bug 199097

Summary: Make sure to check for file descriptor value before using FD_CLR
Product: WebKit Reporter: youenn fablet <youennf>
Component: WebRTCAssignee: youenn fablet <youennf>
Status: RESOLVED FIXED    
Severity: Normal CC: commit-queue, eric.carlson, webkit-bug-importer, youennf
Priority: P2 Keywords: InRadar
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
Attachments:
Description Flags
Patch none

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.