Bug 1833854 - Part 6: Round requested nursery before checking range when changing...
[gecko.git] / third_party / libwebrtc / moz-patch-stack / 0015.patch
blob65bcc4bceedfc879104d30c5f3fe19ee503bac4a
1 From: Jed Davis <jld@mozilla.com>
2 Date: Sun, 17 Nov 2019 03:40:00 +0000
3 Subject: Bug 1545504 - Strengthen bounds check in WebRTC PhysicalSocketServer.
4 r=jesup
6 PhysicalSocketServer isn't currently used by Mozilla's WebRTC
7 integration, but just in case, let's make sure that this array index is
8 bounds-checked in actual use, not just in debug builds (which tend to
9 never see realistic test conditions).
11 Differential Revision: https://phabricator.services.mozilla.com/D52745
12 Mercurial Revision: https://hg.mozilla.org/mozilla-central/rev/2b079067648bfe0d064a334bf19bdcc233e26b6e
13 ---
14 rtc_base/physical_socket_server.cc | 2 +-
15 1 file changed, 1 insertion(+), 1 deletion(-)
17 diff --git a/rtc_base/physical_socket_server.cc b/rtc_base/physical_socket_server.cc
18 index 4ed4fd0cbb..60d024c769 100644
19 --- a/rtc_base/physical_socket_server.cc
20 +++ b/rtc_base/physical_socket_server.cc
21 @@ -1397,7 +1397,7 @@ bool PhysicalSocketServer::WaitSelect(int cmsWait, bool process_io) {
22 int fd = pdispatcher->GetDescriptor();
23 // "select"ing a file descriptor that is equal to or larger than
24 // FD_SETSIZE will result in undefined behavior.
25 - RTC_DCHECK_LT(fd, FD_SETSIZE);
26 + RTC_CHECK_LT(fd, FD_SETSIZE);
27 if (fd > fdmax)
28 fdmax = fd;
30 --
31 2.34.1