Closed Bug 1104970 Opened 5 years ago Closed 5 years ago

[EME] GMPStorage can't handle long record names


(Core :: Audio/Video, defect)

Windows 8.1
Not set



Tracking Status
firefox37 --- fixed
firefox38 --- fixed
firefox39 --- fixed


(Reporter: cpearce, Assigned: cpearce)


(Blocks 1 open bug)



(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+
Keywords: checkin-needed
Closed: 5 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.