must check for zero-length in reader32::read() before calling memcpy

memcpy's behavior is undefined if the dst-ptr is null, but reader32 supports
null as long as the size is 0, so it needs to check explicitly before
calling memcpy. This is implemented (now) by calling sk_careful_memcpy.

BUG=skia:

Change-Id: I7033cc5e6d724f50f0aafd9808e297b953848aa7
Reviewed-on: https://skia-review.googlesource.com/9729
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Reed <reed@google.com>
2 files changed