commit | f65183fd76aa82eedaebcbde9395a5dba42fc969 | [log] [tgz] |
---|---|---|
author | Leon Scroggins III <scroggo@google.com> | Mon Oct 07 16:32:14 2013 -0400 |
committer | Leon Scroggins III <scroggo@google.com> | Mon Oct 07 17:30:47 2013 -0400 |
tree | 318ba1c82881ab9b6acc47a72dd978bd44a45044 | |
parent | 9ca82d333cfeb7aa5218efbca95763c15dc440e9 [diff] |
Do not attempt to decode NULL SkData. NewFromFD fails if mmap fails. In that case, it returns a NULL SkData. SkMemoryStream handles NULL input by calling SkData::NewEmpty, which is not threadsafe. If the SkMemoryStream were to get some busted SkData, its call to read might fail. Sidestep this problem by not creating the SkMemoryStream if the SkData is NULL, skipping the call to SkData::NewEmpty. BUG:11028218 Change-Id: Id70299bef1c85ffb5d17102fdb5ea071b0bee68a