Closed Bug 1114825 Opened 10 years ago Closed 10 years ago

[EME] assertion in gmp-clearkey derefing empty std::vector

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

(1 file)

WriteRecordClient::OnWriteComplete in gmp-test-storage can fatally assert when reading an empty record, as it has code:

  virtual void OpenComplete(GMPErr aStatus) MOZ_OVERRIDE {
    if (GMP_SUCCEEDED(aStatus)) {
      mRecord->Write(&mData.front(), mData.size());
    } else {
      GMPRunOnMainThread(mOnFailure);
      mOnSuccess->Destroy();
    }
  }

the &mData.front() fatally asserts, when mData.size()==0.

We've already fixed this in the gmp-fake copy of the storage code.
Attached patch PatchSplinter Review
Simple fix; don't deref an empty std::vector...
Attachment #8540453 - Flags: review?(edwin)
https://hg.mozilla.org/mozilla-central/rev/c5491c64beea
https://hg.mozilla.org/mozilla-central/rev/5ccfc23ed868
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: