skia2/dm
Mike Klein 45dcc0c42c Fix gather_uninteresting_hashes()
It can crash when the file length is an exact multiple of the page size.

When the file size is not an exact page size multiple,
SkData::MakeFromFileName() (i.e. mmap) happens to fill the rest with \0,
giving us a terminating \0 for free.  SkStrSplit() uses this to stop.

When the file size is an exact page size multiple, there's no guaranteed
\0.  We might find one on the next page immediately, eventually, or we
might just segfault.  Whoops.

To fix, copy to an SkString which ought to plop in a \0 for us.

Change-Id: I51bbfdd85dfbb1c2276249d0255cf1c410ef9999
Reviewed-on: https://skia-review.googlesource.com/11409
Commit-Queue: Mike Klein <mtklein@chromium.org>
Reviewed-by: Mike Klein <mtklein@chromium.org>
2017-04-05 23:08:08 +00:00
..
DM.cpp Fix gather_uninteresting_hashes() 2017-04-05 23:08:08 +00:00
DMGpuSupport.h Rename GrContextFactory::ContextOptions to ContextOverrides 2017-02-21 21:45:45 +00:00
DMJsonWriter.cpp Move SkOSPath out of include/core. 2016-11-08 20:20:15 +00:00
DMJsonWriter.h Add gamma_correct option field to dm.json 2016-02-29 07:38:01 -08:00
DMSrcSink.cpp Revert[4] "clean up (partially) colortable api"""" 2017-04-03 19:29:38 +00:00
DMSrcSink.h Revert "Revert "Add color spin test for SkColorSpaceXformCanvas"" 2017-03-18 15:55:38 +00:00