Commit Graph

7 Commits

Author SHA1 Message Date
Herb Derby
26300d64ca Make allocation of SkDescriptor do initialization
The SkDescriptor fuzzer did not call init. This caused
mysterious failures.

Make SkDescriptor's constructor initialize its fields.
Remove init().

Change-Id: Icab79c53b2d2878fceecfec06c886b71613cea6f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/260287
Reviewed-by: Mike Klein <mtklein@google.com>
Reviewed-by: Mike Reed <reed@google.com>
Commit-Queue: Herb Derby <herb@google.com>
2019-12-16 19:55:42 +00:00
Herb Derby
790eff85a0 Fix fuzz bug in isValid for SkDescriptor
isValid read memory beyond the buffer that was uninitialized.

BUG=oss-fuzz:18555

Change-Id: I5576add2cd7bfbe146d495239b96210fe15fe562
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/252538
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-11-04 20:30:16 +00:00
Herb Derby
4a1af26f1a Fix fuzzer bug in SkDescriptor::isValid
This is following up chrome bug:
https://bugs.chromium.org/p/chromium/issues/detail?id=996211

BUG=skia:18491

Change-Id: I4c85bc916903aaa2fdf7eb226bdf3e57f8b1c66c
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/250578
Commit-Queue: Herb Derby <herb@google.com>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-10-24 16:33:52 +00:00
Ben Wagner
9707a7e51c IWYU for tests A-D.
Change-Id: I0cb383eb6ea5a302627f93b90182a7286c2c0995
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/212280
Reviewed-by: Hal Canary <halcanary@google.com>
Commit-Queue: Ben Wagner <bungeman@google.com>
2019-05-07 14:24:15 +00:00
Mike Klein
c0bd9f9fe5 rewrite includes to not need so much -Ifoo
Current strategy: everything from the top

Things to look at first are the manual changes:

   - added tools/rewrite_includes.py
   - removed -Idirectives from BUILD.gn
   - various compile.sh simplifications
   - tweak tools/embed_resources.py
   - update gn/find_headers.py to write paths from the top
   - update gn/gn_to_bp.py SkUserConfig.h layout
     so that #include "include/config/SkUserConfig.h" always
     gets the header we want.

No-Presubmit: true
Change-Id: I73a4b181654e0e38d229bc456c0d0854bae3363e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/209706
Commit-Queue: Mike Klein <mtklein@google.com>
Reviewed-by: Hal Canary <halcanary@google.com>
Reviewed-by: Brian Osman <brianosman@google.com>
Reviewed-by: Florin Malita <fmalita@chromium.org>
2019-04-24 16:27:11 +00:00
Mike Klein
73b0df10f7 tweak Descriptor_invalid_rec_size to not over-copy
When we pretend the SkScalerContextRec is 4 bytes bigger than it is, we
copy 4 bytes more than we should, and that's freaking out the ASAN bots.

Let's just say it's a little small.  Still wrong, no stack overflow.

Cq-Include-Trybots: skia.primary:Test-Debian9-Clang-GCE-CPU-AVX2-x86_64-Release-All-ASAN
Change-Id: I03b292b9751289782cc0afcb860ca9196130985a
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/200557
Commit-Queue: Mike Klein <mtklein@google.com>
Commit-Queue: Adrienne Walker <enne@chromium.org>
Auto-Submit: Mike Klein <mtklein@google.com>
Reviewed-by: Adrienne Walker <enne@chromium.org>
2019-03-12 23:34:24 +00:00
Adrienne Walker
08b0c97aa9 Add validation to reading kRec_SkDescriptorTags
Bug: chromium:940284, chromium:940843
Change-Id: Id6ce237781c6515f52341d3e56614e13e8ba76d6
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/200045
Commit-Queue: Mike Klein <mtklein@google.com>
Auto-Submit: Adrienne Walker <enne@chromium.org>
Reviewed-by: Khushal Sagar <khushalsagar@chromium.org>
Reviewed-by: Mike Klein <mtklein@google.com>
2019-03-12 21:14:04 +00:00