Closed Bug 1104970 Opened 10 years ago Closed 10 years ago

[EME] GMPStorage can't handle long record names

Categories

(Core :: Audio/Video, defect)

x86_64
Windows 8.1
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla37
Tracking Status
firefox37 --- fixed
firefox38 --- fixed
firefox39 --- fixed

People

(Reporter: cpearce, Assigned: cpearce)

References

(Blocks 1 open bug)

Details

Attachments

(2 files, 3 obsolete files)

Bug 1100499 changed our GMPStorage API to base64encode the record name and uses that as the file name. If a long record name is put through this, it can hit the max path size of a file on Windows, resulting in I/O failure.
We should really detect failures in GMPStorage reads/writes in our gtests, instead of assuming that reads/writes always succeed...
Attachment #8528754 - Flags: review?(edwin)
* Revert to using Mozilla::HashString(recordName) as the filename for records.
* Write the length of the recordName and then the recordName into the start of the record's file, before the actual record data.
* Treat files which aren't in this format as empty records; so they can be overwritten.
Attachment #8528757 - Flags: review?(rjesup)
With WAE compile fixes on for GCC, and test tweaked to pass...
Attachment #8528757 - Attachment is obsolete: true
Attachment #8528757 - Flags: review?(rjesup)
Attachment #8528787 - Flags: review?(rjesup)
Comment on attachment 8528787 [details] [diff] [review]
Patch: Store GMP record name in record file on disk

Review of attachment 8528787 [details] [diff] [review]:
-----------------------------------------------------------------

Looks good... spent a while looking over the size/offset stuff; looks good
Attachment #8528787 - Flags: review?(rjesup) → review+
Commit message updated.
Attachment #8531710 - Flags: review+
Attachment #8528754 - Attachment is obsolete: true
Commit message updated to reflect r+
Attachment #8528787 - Attachment is obsolete: true
Attachment #8531712 - Flags: review+
https://hg.mozilla.org/mozilla-central/rev/5fc3ea149549
https://hg.mozilla.org/mozilla-central/rev/8d18f4965871
Status: NEW → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla37
Mass update firefox-status to track EME uplift.
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: