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: Adrian Bateman <adrianba@microsoft.com>
Date: Fri, 28 Feb 2014 22:35:39 +0000
To: David Dorwin <ddorwin@google.com>, "public-html-media@w3.org" <public-html-media@w3.org>
Message-ID: <458b6af0bb6842128f4bc3e62ca836cd@BL2PR03MB604.namprd03.prod.outlook.com>
I think it is reasonable to take the same approach.

From: David Dorwin [mailto:ddorwin@google.com]
Sent: Friday, February 21, 2014 2:17 PM
To: public-html-media@w3.org
Subject: [EME] Uint8Array parameters may be modified while scheduled task is pending

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 Friday, 28 February 2014 22:36:33 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 6 January 2015 20:33:02 UTC