Title: [244672] trunk/Source/ThirdParty/libwebrtc
- Revision
- 244672
- Author
- [email protected]
- Date
- 2019-04-25 17:23:55 -0700 (Thu, 25 Apr 2019)
Log Message
Make sure sockets file descriptors are in the correct range
https://bugs.webkit.org/show_bug.cgi?id=197301
<rdar://problem/48389381>
Reviewed by Chris Dumez.
* Source/webrtc/rtc_base/physicalsocketserver.cc:
* WebKit/0001-fix-197301.patch: Added.
Modified Paths
Added Paths
Diff
Modified: trunk/Source/ThirdParty/libwebrtc/ChangeLog (244671 => 244672)
--- trunk/Source/ThirdParty/libwebrtc/ChangeLog 2019-04-26 00:17:34 UTC (rev 244671)
+++ trunk/Source/ThirdParty/libwebrtc/ChangeLog 2019-04-26 00:23:55 UTC (rev 244672)
@@ -1,3 +1,14 @@
+2019-04-25 Youenn Fablet <[email protected]>
+
+ Make sure sockets file descriptors are in the correct range
+ https://bugs.webkit.org/show_bug.cgi?id=197301
+ <rdar://problem/48389381>
+
+ Reviewed by Chris Dumez.
+
+ * Source/webrtc/rtc_base/physicalsocketserver.cc:
+ * WebKit/0001-fix-197301.patch: Added.
+
2019-04-25 Alex Christensen <[email protected]>
Start using C++17
Modified: trunk/Source/ThirdParty/libwebrtc/Source/webrtc/rtc_base/physicalsocketserver.cc (244671 => 244672)
--- trunk/Source/ThirdParty/libwebrtc/Source/webrtc/rtc_base/physicalsocketserver.cc 2019-04-26 00:17:34 UTC (rev 244671)
+++ trunk/Source/ThirdParty/libwebrtc/Source/webrtc/rtc_base/physicalsocketserver.cc 2019-04-26 00:23:55 UTC (rev 244672)
@@ -1424,6 +1424,8 @@
// "select"ing a file descriptor that is equal to or larger than
// FD_SETSIZE will result in undefined behavior.
RTC_DCHECK_LT(fd, FD_SETSIZE);
+ if (fd < 0 || fd >= FD_SETSIZE)
+ continue;
if (fd > fdmax)
fdmax = fd;
Added: trunk/Source/ThirdParty/libwebrtc/WebKit/0001-fix-197301.patch (0 => 244672)
--- trunk/Source/ThirdParty/libwebrtc/WebKit/0001-fix-197301.patch (rev 0)
+++ trunk/Source/ThirdParty/libwebrtc/WebKit/0001-fix-197301.patch 2019-04-26 00:23:55 UTC (rev 244672)
@@ -0,0 +1,25 @@
+From cc826ae8baabae99a147d57ee2216e4cc4c2eaf6 Mon Sep 17 00:00:00 2001
+From: Youenn Fablet <[email protected]>
+Date: Thu, 25 Apr 2019 16:39:31 -0700
+Subject: [PATCH] fix-197301
+
+---
+ .../libwebrtc/Source/webrtc/rtc_base/physicalsocketserver.cc | 2 ++
+ 1 file changed, 2 insertions(+)
+
+diff --git a/Source/ThirdParty/libwebrtc/Source/webrtc/rtc_base/physicalsocketserver.cc b/Source/ThirdParty/libwebrtc/Source/webrtc/rtc_base/physicalsocketserver.cc
+index 7448a7e0427..91cb7da8366 100644
+--- a/Source/ThirdParty/libwebrtc/Source/webrtc/rtc_base/physicalsocketserver.cc
++++ b/Source/ThirdParty/libwebrtc/Source/webrtc/rtc_base/physicalsocketserver.cc
+@@ -1424,6 +1424,8 @@ bool PhysicalSocketServer::WaitSelect(int cmsWait, bool process_io) {
+ // "select"ing a file descriptor that is equal to or larger than
+ // FD_SETSIZE will result in undefined behavior.
+ RTC_DCHECK_LT(fd, FD_SETSIZE);
++ if (fd < 0 || fd >= FD_SETSIZE)
++ continue;
+ if (fd > fdmax)
+ fdmax = fd;
+
+--
+2.20.1 (Apple Git-116)
+
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes