DescriptionCdmFileIOImpl: Always SetLength(0) before WriteFile().
Since Write() takes two (or more) steps to finish, it's possible for
CdmFileIOImpl to be destructed after SetLength() is called but before
WriteFile() is called. In that case, if we SetLength(data_size), we end up with
a corrupted file. If we SetLength(0), we end up with an empty file, which is
relatively better.
BUG=410630
TEST=ECKEncryptedMediaTest.FileIOTest still passes.
Patch Set 1 #
Messages
Total messages: 6 (1 generated)
|