Changeset 268975 in webkit
- Timestamp:
- Oct 26, 2020, 6:48:46 AM (6 years ago)
- Location:
- trunk/Source/WebCore
- Files:
-
- 3 edited
-
ChangeLog (modified) (1 diff)
-
platform/graphics/gstreamer/eme/CDMProxyClearKey.cpp (modified) (1 diff)
-
platform/graphics/gstreamer/eme/CDMThunder.cpp (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebCore/ChangeLog
r268974 r268975 1 2020-10-26 Xabier Rodriguez Calvar <calvaris@igalia.com> 2 3 [EME] Fix casts and sizes printing 4 https://bugs.webkit.org/show_bug.cgi?id=218171 5 6 Reviewed by Philippe Normand. 7 8 Fix size printing and casts in CDMThunder and ClearKey. 9 10 * platform/graphics/gstreamer/eme/CDMProxyClearKey.cpp: 11 (WebCore::CDMProxyClearKey::cencDecryptSubsampled): 12 * platform/graphics/gstreamer/eme/CDMThunder.cpp: 13 (WebCore::ParsedResponseMessage::ParsedResponseMessage): 14 (WebCore::CDMInstanceSessionThunder::requestLicense): 15 (WebCore::CDMInstanceSessionThunder::updateLicense): 16 (WebCore::CDMInstanceSessionThunder::loadSession): 17 (WebCore::CDMInstanceSessionThunder::removeSessionData): 18 1 19 2020-10-26 Zalan Bujtas <zalan@apple.com> 2 20 -
trunk/Source/WebCore/platform/graphics/gstreamer/eme/CDMProxyClearKey.cpp
r264219 r268975 185 185 186 186 // FIXME: These are high-frequency messages, not sure if there's a better logging lib in WebCore. 187 LOG(EME, "EME - subsample index %u - %u bytes clear (% lu bytes left to decrypt)", subsampleIndex, subsampleNumClearBytes, input.encryptedBufferSizeInBytes - encryptedBufferByteOffset);187 LOG(EME, "EME - subsample index %u - %u bytes clear (%zu bytes left to decrypt)", subsampleIndex, subsampleNumClearBytes, input.encryptedBufferSizeInBytes - encryptedBufferByteOffset); 188 188 189 189 encryptedBufferByteOffset += subsampleNumClearBytes; 190 190 191 191 if (subsampleNumEncryptedBytes) { 192 LOG(EME, "EME - subsample index %u - %u bytes encrypted (% lu bytes left to decrypt)", subsampleIndex, subsampleNumEncryptedBytes, input.encryptedBufferSizeInBytes - encryptedBufferByteOffset);192 LOG(EME, "EME - subsample index %u - %u bytes encrypted (%zu bytes left to decrypt)", subsampleIndex, subsampleNumEncryptedBytes, input.encryptedBufferSizeInBytes - encryptedBufferByteOffset); 193 193 194 194 if (gcry_error_t cipherError = gcry_cipher_decrypt(gCryptHandle(), input.encryptedBuffer + encryptedBufferByteOffset, subsampleNumEncryptedBytes, 0, 0)) { -
trunk/Source/WebCore/platform/graphics/gstreamer/eme/CDMThunder.cpp
r268968 r268975 315 315 316 316 StringView payload(reinterpret_cast<const LChar*>(buffer->data()), buffer->size()); 317 size_t typePosition = payload.find(":Type:"); 317 StringView type(reinterpret_cast<const LChar*>(":Type:"), 6); 318 size_t typePosition = payload.find(type, 0); 318 319 StringView requestType(payload.characters8(), typePosition != notFound ? typePosition : 0); 319 320 unsigned offset = 0u; … … 464 465 m_initData = InitData(instance->keySystem(), WTFMove(initDataSharedBuffer)); 465 466 466 GST_TRACE("Going to request a new session id, init data size % lu", m_initData.payload()->size());467 GST_TRACE("Going to request a new session id, init data size %zu", m_initData.payload()->size()); 467 468 GST_MEMDUMP("init data", m_initData.payload()->dataAsUInt8Ptr(), m_initData.payload()->size()); 468 469 … … 530 531 if (parsedResponseMessage.hasPayload()) { 531 532 Ref<SharedBuffer> message = WTFMove(parsedResponseMessage.payload()); 532 GST_DEBUG("got message of size % lu", message->size());533 GST_DEBUG("got message of size %zu", message->size()); 533 534 GST_MEMDUMP("message", message->dataAsUInt8Ptr(), message->size()); 534 535 callback(false, WTF::nullopt, WTF::nullopt, … … 536 537 WTFMove(message)), SuccessValue::Succeeded); 537 538 } else { 538 GST_ERROR("message of size % lu incorrectly formatted", responseMessage ? responseMessage->size() : 0);539 GST_ERROR("message of size %zu incorrectly formatted", responseMessage ? responseMessage->size() : 0); 539 540 callback(false, WTF::nullopt, WTF::nullopt, WTF::nullopt, SuccessValue::Failed); 540 541 } … … 564 565 if (parsedResponseMessage.hasPayload()) { 565 566 Ref<SharedBuffer> message = WTFMove(parsedResponseMessage.payload()); 566 GST_DEBUG("got message of size % lu", message->size());567 GST_DEBUG("got message of size %zu", message->size()); 567 568 GST_MEMDUMP("message", message->dataAsUInt8Ptr(), message->size()); 568 569 callback(WTF::nullopt, WTF::nullopt, std::make_pair(parsedResponseMessage.typeOr(MediaKeyMessageType::LicenseRequest), 569 570 WTFMove(message)), SuccessValue::Succeeded, SessionLoadFailure::None); 570 571 } else { 571 GST_ERROR("message of size % lu incorrectly formatted", responseMessage ? responseMessage->size() : 0);572 GST_ERROR("message of size %zu incorrectly formatted", responseMessage ? responseMessage->size() : 0); 572 573 callback(WTF::nullopt, WTF::nullopt, WTF::nullopt, SuccessValue::Failed, SessionLoadFailure::Other); 573 574 } … … 610 611 if (parsedResponseMessage.hasPayload()) { 611 612 Ref<SharedBuffer> message = WTFMove(parsedResponseMessage.payload()); 612 GST_DEBUG("session %s removed, message length % lu", m_sessionID.utf8().data(), message->size());613 GST_DEBUG("session %s removed, message length %zu", m_sessionID.utf8().data(), message->size()); 613 614 callback(m_keyStore.allKeysAs(MediaKeyStatus::Released), WTFMove(message), SuccessValue::Succeeded); 614 615 } else { 615 GST_WARNING("message of size % lu incorrectly formatted as session %s removal answer", buffer ? buffer->size() : 0,616 GST_WARNING("message of size %zu incorrectly formatted as session %s removal answer", buffer ? buffer->size() : 0, 616 617 m_sessionID.utf8().data()); 617 618 callback(m_keyStore.allKeysAs(MediaKeyStatus::InternalError), WTF::nullopt, SuccessValue::Failed);
Note:
See TracChangeset
for help on using the changeset viewer.