Detect and reject profiles which we would walk off the end The linked example is a 3 channel 2x2x2 table that happens to have nothing after it. I considered several fixes, but the fact that skcms really doesn't want to own buffers or do any allocation makes that tricky. Given that moxcms will be doing the parsing in Chromium and https://review.skia.org/1215162 will make sure there's sufficient padding, we'll make skcms's own parsing be a bit pickier such that the buffer is big enough for a 1-2 byte overread. Clients can allocate their buffer up to the next multiple of 4 bytes (on 32 bit systems) or 8 bytes (on 64 bit sytems) to make sure there's plenty of padding. None of the existing tests fail locally on xsan (the bug was only on 32 bit anyway). Bug: oss-fuzz:504261818 Change-Id: I8f1206b993c427e13e38038ef7abde6f651732a4 Reviewed-on: https://skia-review.googlesource.com/c/skcms/+/1214462 Reviewed-by: Florin Malita <fmalita@google.com> Commit-Queue: Kaylee Lubick <kjlubick@google.com>
To build with ninja, simply run ninja from the root directory. This will produce a library in /out.
There are also Bazel rules, outlined in BAZEL.md