Fix SkDashImpl::CreateProc OOM on garbage input

Verify that there's enough data to read from before allocating gigantic
blocks of memory.  This was caught by a fuzzer.

Bug: chromium:835418
Change-Id: I43fb1d11ec13726aacb62fe6aeb9f137424fb783
Reviewed-on: https://skia-review.googlesource.com/123538
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Adrienne Walker <enne@chromium.org>
Reviewed-by: Mike Klein <mtklein@google.com>
1 file changed