[webkit-reviews] review granted: [Bug 189740] [EME] Add WebM sanitization : [Attachment 350106] Patch

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Wed Sep 19 08:33:59 PDT 2018


Xabier Rodríguez Calvar <calvaris at igalia.com> has granted  review:
Bug 189740: [EME] Add WebM sanitization
https://bugs.webkit.org/show_bug.cgi?id=189740

Attachment 350106: Patch

https://bugs.webkit.org/attachment.cgi?id=350106&action=review




--- Comment #3 from Xabier Rodríguez Calvar <calvaris at igalia.com> ---
Comment on attachment 350106
  --> https://bugs.webkit.org/attachment.cgi?id=350106
Patch

View in context: https://bugs.webkit.org/attachment.cgi?id=350106&action=review

> Source/WebCore/ChangeLog:10
> +	   see
https://www.w3.org/TR/encrypted-media/#dom-mediakeysession-generaterequest

Capital at the beginning, period at the end.

> Source/WebCore/Modules/encryptedmedia/InitDataRegistry.cpp:160
> +    if (buffer.isEmpty() || buffer.size() > kWebmMaxContentEncKeyIDSize)
> +	   return std::nullopt;
> +    keyIDs.append(buffer.copy());

Instead of this, I'd try to sanitize and if the result is null, bailout.
Otherwise, move the WTFMove the result inside the append


More information about the webkit-reviews mailing list