Changeset 245852 in webkit


Ignore:
Timestamp:
May 29, 2019 10:05:02 AM (5 years ago)
Author:
Brent Fulgham
Message:

Correct flaky WebAuthN test cases
https://bugs.webkit.org/show_bug.cgi?id=198308
<rdar://problem/48677219>

Reviewed by David Kilzer.

Correct offset math in the MockHidConnection implementation. The write position of
the payload buffer was computed using the value of 'size()', which is set to the full
capacity of the vector after a 'grow()' operation.

Tests: http/wpt/webauthn

  • UIProcess/WebAuthentication/Mock/MockHidConnection.cpp:

(WebKit::MockHidConnection::feedReports):

Location:
trunk/Source/WebKit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r245847 r245852  
     12019-05-29  Brent Fulgham  <bfulgham@apple.com>
     2
     3        Correct flaky WebAuthN test cases
     4        https://bugs.webkit.org/show_bug.cgi?id=198308
     5        <rdar://problem/48677219>
     6
     7        Reviewed by David Kilzer.
     8
     9        Correct offset math in the MockHidConnection implementation. The write position of
     10        the payload buffer was computed using the value of 'size()', which is set to the full
     11        capacity of the vector after a 'grow()' operation.
     12
     13        Tests: http/wpt/webauthn
     14
     15        * UIProcess/WebAuthentication/Mock/MockHidConnection.cpp:
     16        (WebKit::MockHidConnection::feedReports):
     17
    1182019-05-28  Fujii Hironori  <Hironori.Fujii@sony.com>
    219
  • trunk/Source/WebKit/UIProcess/WebAuthentication/Mock/MockHidConnection.cpp

    r245500 r245852  
    196196        payload.reserveInitialCapacity(kHidInitResponseSize);
    197197        payload.appendVector(m_nonce);
     198        size_t writePosition = payload.size();
    198199        if (stagesMatch() && m_configuration.hid->error == Mock::Error::WrongNonce)
    199200            payload[0]--;
    200201        payload.grow(kHidInitResponseSize);
    201         cryptographicallyRandomValues(payload.data() + payload.size(), CtapChannelIdSize);
     202        cryptographicallyRandomValues(payload.data() + writePosition, CtapChannelIdSize);
    202203        auto channel = kHidBroadcastChannel;
    203204        if (stagesMatch() && m_configuration.hid->error == Mock::Error::WrongChannelId)
Note: See TracChangeset for help on using the changeset viewer.