diff options
author | Leon Scroggins III <scroggo@google.com> | 2017-09-28 14:33:57 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-09-28 19:51:32 +0000 |
commit | 4cdbf6056de29e8c12c3b1b4c2c2fa286cf68049 (patch) | |
tree | a01bcff9249a9b5daada122ea46c8c7b21aef63b /resources | |
parent | c3269aea5ba61a0c2228b029c7626802474825f4 (diff) |
Avoid uninitialized memory in readByteArrayAsData
Bug: 769134
readByteArray can fail (due to not having enough available or due to the
wrong alignment). If it does, do not return an uninitialized block of
memory.
Further, drop the initial size check, which is covered by readByteArray.
Add a test.
Change-Id: Ia101697c5bb1ca3ae3df1795f37a74b2f602797d
Reviewed-on: https://skia-review.googlesource.com/52742
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Leon Scroggins <scroggo@google.com>
Diffstat (limited to 'resources')
-rw-r--r-- | resources/crbug769134.fil | bin | 0 -> 440 bytes |
1 files changed, 0 insertions, 0 deletions
diff --git a/resources/crbug769134.fil b/resources/crbug769134.fil Binary files differnew file mode 100644 index 0000000000..a8a79e8506 --- /dev/null +++ b/resources/crbug769134.fil |