Go to file
Adrienne Walker 27300f0d1a Return nullptr from readFlattenable when invalid
Currently, in SkReadBuffer::readFlattenable, if reading the sizeRecorded
fails (or any previous read), then the read buffer is invalid and the
size returns zero.  In this bug, it calls SkLine2DPathEffect::CreateProc
which never checks the validity of the readBuffer and returns a
valid object.  Because the read size also is zero, then unset
but seemingly valid object gets returned to the caller.

Other failure cases return nullptr when the readBuffer is invalid, so
instead of making all procs handle this, just handle this at the end
of readFlattenable.

It'd be ideal if SkFlattenable::Deserialize could forward this error
back to the caller, but this seems like a smaller fix.

Bug: chromium: 854947
Change-Id: I26e4e90320c0d2c4efa191d301aa4ac7783eb476
Reviewed-on: https://skia-review.googlesource.com/138000
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2018-06-28 16:10:57 +00:00
animations first cut at a checkbox 2009-10-21 19:41:10 +00:00
bench update software DM/nanobench configs for color testing 2018-06-19 21:15:18 +00:00
bin add --sync to adb push in bin/droid 2018-06-28 15:46:57 +00:00
dm unify term/crash handlers, include SIGINT 2018-06-28 15:36:47 +00:00
docker docker - Record the skia git hash. 2018-06-20 14:19:01 +00:00
docs fix doc catalog 2018-06-28 13:18:16 +00:00
example Compile with GCC 7.2.0. 2018-03-13 22:18:18 +00:00
experimental Revert "Revert "SkTypes: extract SkTo"" 2018-06-14 14:55:17 +00:00
fuzz Update fuzz autodetect for other fuzzer aliases 2018-06-20 13:56:58 +00:00
gm gpu: Expose GrContextPriv::abandoned in the public API. 2018-06-27 01:08:45 +00:00
gn added TextureRenderTarget to Metal gpu backend 2018-06-28 15:30:57 +00:00
include Revert "Remove drawTextBlob from device use drawGlyphRunList" 2018-06-28 12:00:47 +00:00
infra Roll recipe dependencies (trivial). 2018-06-27 20:04:19 +00:00
modules [skottie] Ensure static split-position properties are committed 2018-06-22 01:28:06 +00:00
platform_tools SkAR: drawing text, shapes, rotation modes enabled, translating objects 2018-06-19 19:10:54 +00:00
resources Update libjpeg-turbo to pre-2.0.0 (from 1.5.3) 2018-06-26 15:22:12 +00:00
samplecode Refactor GrPipeline dynamic state. 2018-06-26 15:35:12 +00:00
site fix doc catalog 2018-06-28 13:18:16 +00:00
src Return nullptr from readFlattenable when invalid 2018-06-28 16:10:57 +00:00
tests GrTessellator: handle collinear final vertex. 2018-06-28 14:07:47 +00:00
third_party Roll skia/third_party/skcms 97bcdb1d73a1..4268c0b12bf2 (1 commits) 2018-06-27 15:17:15 +00:00
tools fix doc catalog 2018-06-28 13:18:16 +00:00
.clang-format Revert "Update clang-format matching more of Chromium" 2018-05-24 13:27:25 +00:00
.gitignore SkAR: drawing text, shapes, rotation modes enabled, translating objects 2018-06-19 19:10:54 +00:00
.gn Basic standalone GN configs. 2016-07-21 12:25:45 -07:00
AUTHORS Fixed SkVertices crashing on Windows DLL builds 2018-04-22 14:42:01 +00:00
BUILD.gn Reland "Implement onMakeClone(const SkFontArguments& args) in class SkTypeface_fontconfig." 2018-06-22 21:12:58 +00:00
codereview.settings Make uploading to Gerrit the default for Skia 2016-11-09 19:07:56 +00:00
CONTRIBUTING Fix references to https://sites.google.com/site/skiadocs/. 2015-02-03 13:12:54 -02:00
CQ_COMMITTERS Moved committer list to chrome-infra-auth and deleted it from the repo 2015-09-02 13:37:54 -07:00
DEPS Roll third_party/externals/angle2 26581113047a..a26de2500503 (2 commits) 2018-06-28 14:15:46 +00:00
Doxyfile Make the housekeeper upload doxygen to a newer bucket 2016-10-04 13:23:57 -07:00
LICENSE BUG=skia:5602 2016-09-02 11:19:34 -07:00
OWNERS add OWNERS file 2017-12-01 19:50:19 +00:00
PRESUBMIT.py Presubmit: blacklist .recipe_deps 2018-06-22 20:19:57 +00:00
public.bzl [Bazel] Omit new test that causes infinite loop in libjpeg-turbo. 2018-06-26 20:15:12 +00:00
README Fix references to https://sites.google.com/site/skiadocs/. 2015-02-03 13:12:54 -02:00
README.chromium Update README.chromium. 2015-06-11 13:19:24 -07:00
whitespace.txt Whitespace change to trigger flutter roller 2018-06-22 01:18:46 +00:00

Skia is a complete 2D graphic library for drawing Text, Geometries, and Images.

See full details, and build instructions, at https://skia.org.