[webkit-changes] [WebKit/WebKit] 412bcd: Reduce use of memcmp()

Chris Dumez noreply at github.com
Sat Dec 14 10:06:59 PST 2024


  Branch: refs/heads/main
  Home:   https://github.com/WebKit/WebKit
  Commit: 412bcdd2b3d621e98379e9d0024b235316d7e433
      https://github.com/WebKit/WebKit/commit/412bcdd2b3d621e98379e9d0024b235316d7e433
  Author: Chris Dumez <cdumez at apple.com>
  Date:   2024-12-14 (Sat, 14 Dec 2024)

  Changed paths:
    M Source/WTF/wtf/StdLibExtras.h
    M Source/WTF/wtf/URLHelpers.cpp
    M Source/WebCore/Modules/webauthn/fido/FidoConstants.h
    M Source/WebCore/Modules/webauthn/fido/U2fCommandConstructor.cpp
    M Source/WebCore/crypto/cocoa/CryptoKeyOKPCocoa.cpp
    M Source/WebCore/css/CSSPrimitiveValue.cpp
    M Source/WebCore/dom/Node.cpp
    M Source/WebCore/html/track/DataCue.cpp
    M Source/WebCore/platform/audio/mac/AudioHardwareListenerMac.cpp
    M Source/WebCore/platform/encryptedmedia/clearkey/CDMClearKey.cpp
    M Source/WebCore/platform/encryptedmedia/clearkey/CDMClearKey.h
    M Source/WebCore/platform/image-decoders/ScalableImageDecoder.cpp
    M Source/WebCore/platform/image-decoders/ScalableImageDecoder.h
    M Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp
    M Source/WebCore/platform/network/DNS.cpp
    M Source/WebCore/platform/network/DNS.h
    M Source/WebKit/UIProcess/WebAuthentication/Cocoa/CcidConnection.mm
    M Source/WebKit/UIProcess/WebAuthentication/Cocoa/NfcConnection.mm
    M Source/WebKit/UIProcess/WebAuthentication/fido/CtapHidDriver.cpp

  Log Message:
  -----------
  Reduce use of memcmp()
https://bugs.webkit.org/show_bug.cgi?id=284609

Reviewed by Ryosuke Niwa and Geoffrey Garen.

Reduce use of memcmp() in favor of safer variants.

* Source/WTF/wtf/StdLibExtras.h:
(WTF::compareSpans):
* Source/WTF/wtf/URLHelpers.cpp:
* Source/WebCore/Modules/webauthn/fido/FidoConstants.h:
* Source/WebCore/Modules/webauthn/fido/U2fCommandConstructor.cpp:
(fido::WebCore::constructU2fRegisterCommand):
(fido::constructBogusU2fRegistrationCommand):
* Source/WebCore/crypto/cocoa/CryptoKeyOKPCocoa.cpp:
(WebCore::CryptoKeyOKP::platformCheckPairedKeys):
* Source/WebCore/css/CSSPrimitiveValue.cpp:
(WebCore::valueFromPool):
* Source/WebCore/dom/Node.cpp:
(WebCore::compareDetachedElementsPosition):
* Source/WebCore/html/track/DataCue.cpp:
(WebCore::DataCue::cueContentsMatch const):
* Source/WebCore/platform/audio/mac/AudioHardwareListenerMac.cpp:
(WebCore::AudioHardwareListenerMac::propertyChanged):
* Source/WebCore/platform/encryptedmedia/clearkey/CDMClearKey.cpp:
(WebCore::extractKeyidsLocationFromCencInitData):
* Source/WebCore/platform/encryptedmedia/clearkey/CDMClearKey.h:
* Source/WebCore/platform/image-decoders/ScalableImageDecoder.cpp:
(WebCore::ScalableImageDecoder::create):
* Source/WebCore/platform/image-decoders/ScalableImageDecoder.h:
(WebCore::ScalableImageDecoder::rgbColorProfile): Deleted.
(WebCore::ScalableImageDecoder::inputDeviceColorProfile): Deleted.
* Source/WebCore/platform/image-decoders/png/PNGImageDecoder.cpp:
(WebCore::PNGImageDecoder::readChunks):
* Source/WebCore/platform/network/DNS.cpp:
(WebCore::IPAddress::isLoopback const):
* Source/WebCore/platform/network/DNS.h:
(WebCore::IPAddress::compare const):
* Source/WebKit/UIProcess/WebAuthentication/Cocoa/CcidConnection.mm:
(WebKit::CcidConnection::trySelectFidoApplet):
(WebKit::fido::compareCcidVersion): Deleted.
* Source/WebKit/UIProcess/WebAuthentication/Cocoa/NfcConnection.mm:
(WebKit::fido::compareVersion):
(WebKit::fido::trySelectFidoApplet):
* Source/WebKit/UIProcess/WebAuthentication/fido/CtapHidDriver.cpp:
(WebKit::CtapHidDriver::continueAfterChannelAllocated):

Canonical link: https://commits.webkit.org/287840@main



To unsubscribe from these emails, change your notification settings at https://github.com/WebKit/WebKit/settings/notifications


More information about the webkit-changes mailing list