RESOLVED FIXED85444
Crash in webkitAddKey() when key parameter is null
https://bugs.webkit.org/show_bug.cgi?id=85444
Summary Crash in webkitAddKey() when key parameter is null
David Dorwin
Reported 2012-05-02 18:31:43 PDT
The following results in a crash video.webkitAddKey("foo", null); The IDL ensures that there is a second parameter but not that it isn't null. We need to check this in the code and return an appropriate error. The algorithm in the proposal also needs to be updated to to handle this.
Attachments
Patch (4.82 KB, patch)
2012-07-17 11:16 PDT, David Dorwin
no flags
Patch (5.08 KB, patch)
2012-07-23 16:29 PDT, David Dorwin
no flags
David Dorwin
Comment 1 2012-07-17 11:16:37 PDT
Kentaro Hara
Comment 2 2012-07-18 01:14:03 PDT
Comment on attachment 152791 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=152791&action=review > Source/WebCore/ChangeLog:7 > + Would you add the link to the spec that supports your change? The change looks good but I am not sure if SYNTAX_ERR is the expected error.
David Dorwin
Comment 3 2012-07-19 15:55:25 PDT
(In reply to comment #2) > (From update of attachment 152791 [details]) > View in context: https://bugs.webkit.org/attachment.cgi?id=152791&action=review > > > Source/WebCore/ChangeLog:7 > > + > > Would you add the link to the spec that supports your change? The change looks good but I am not sure if SYNTAX_ERR is the expected error. http://dvcs.w3.org/hg/html-media/raw-file/a70cac1c6d77/encrypted-media/encrypted-media.html#dom-addkey step 1. I had to update it to handle the second argument, but the first argument has always been a SYNTAX_ERR. If there is a better or more appropriate way of handling these cases, I can update this patch and the spec.
Kentaro Hara
Comment 4 2012-07-19 23:30:22 PDT
Comment on attachment 152791 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=152791&action=review >>> Source/WebCore/ChangeLog:7 >>> + >> >> Would you add the link to the spec that supports your change? The change looks good but I am not sure if SYNTAX_ERR is the expected error. > > http://dvcs.w3.org/hg/html-media/raw-file/a70cac1c6d77/encrypted-media/encrypted-media.html#dom-addkey step 1. I had to update it to handle the second argument, but the first argument has always been a SYNTAX_ERR. If there is a better or more appropriate way of handling these cases, I can update this patch and the spec. Thanks. Looks OK. Please describe the link and the explanation you described in bugzilla to this ChangeLog.
Kentaro Hara
Comment 5 2012-07-19 23:31:10 PDT
(In reply to comment #3) > I had to update it to handle the second argument OK, let's fix it in a separate patch.
David Dorwin
Comment 6 2012-07-23 16:29:17 PDT
David Dorwin
Comment 7 2012-07-23 16:31:18 PDT
Added (newer) link to the ChangeLogs. The code is the same. CQ? Thanks.
WebKit Review Bot
Comment 8 2012-07-23 17:37:55 PDT
Comment on attachment 153893 [details] Patch Clearing flags on attachment: 153893 Committed r123409: <http://trac.webkit.org/changeset/123409>
WebKit Review Bot
Comment 9 2012-07-23 17:37:59 PDT
All reviewed patches have been landed. Closing bug.
Note You need to log in before you can comment on or make changes to this bug.