W3C home > Mailing lists > Public > public-html-media@w3.org > February 2014

Re: [EME] Uint8Array parameters may be modified while scheduled task is pending

From: Glenn Adams <glenn@skynav.com>
Date: Tue, 25 Feb 2014 09:06:22 -0700
Message-ID: <CACQ=j+feAC-zMLZx1fnUPF2SnT_+r=z99QGyVSd+FP-qwt95mg@mail.gmail.com>
To: David Dorwin <ddorwin@google.com>
Cc: "public-html-media@w3.org" <public-html-media@w3.org>
Perhaps it would be better to state that a local copy must be made of the
array before returning from these methods.

On Fri, Feb 21, 2014 at 3:16 PM, David Dorwin <ddorwin@google.com> wrote:

> MediaKeys.createSession() and MediaKeySession.update() both accept
> Uint8Arrays. Since these methods schedule a task, it's possible that
> JavaScript can modify the contents of those arrays before the task is run.
> For example:
>> array[0]=0;
>> mediaKeys.createSession("video/webm", array);
>> array[0]=9;
>> // Scheduled task will run later and see 9 in the first element.
> I believe there is a similar issue with MSE, and it was decided that such
> behavior is undefined. Does anyone object to the behavior also being
> undefined for EME? Do we need to explicitly document this anywhere?
> David
Received on Tuesday, 25 February 2014 16:07:10 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 15:48:44 UTC