diff options
author | Lei Zhang <thestig@chromium.org> | 2018-07-02 21:31:33 +0000 |
---|---|---|
committer | Chromium commit bot <commit-bot@chromium.org> | 2018-07-02 21:31:33 +0000 |
commit | 33ac88d2e5090772c04be698807620aa8bc5711e (patch) | |
tree | cd0868f05755e28c81c5d0359251cac09077f9aa /core | |
parent | 7695dd0f9f5a5a91a0fdfc723edfe706a39c87f4 (diff) | |
download | pdfium-33ac88d2e5090772c04be698807620aa8bc5711e.tar.xz |
Access a span properly in DetectSRGB().
Change-Id: Ifeaac7141bd377daa9cf657149937be22b2aa48a
Reviewed-on: https://pdfium-review.googlesource.com/36730
Reviewed-by: Tom Sepez <tsepez@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
Diffstat (limited to 'core')
-rw-r--r-- | core/fpdfapi/page/cpdf_iccprofile.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/core/fpdfapi/page/cpdf_iccprofile.cpp b/core/fpdfapi/page/cpdf_iccprofile.cpp index 94270b110b..0d6050790c 100644 --- a/core/fpdfapi/page/cpdf_iccprofile.cpp +++ b/core/fpdfapi/page/cpdf_iccprofile.cpp @@ -13,8 +13,8 @@ namespace { bool DetectSRGB(pdfium::span<const uint8_t> span) { - return span.size() == 3144 && - memcmp(span.data() + 0x190, "sRGB IEC61966-2.1", 17) == 0; + static const char kSRGB[] = "sRGB IEC61966-2.1"; + return span.size() == 3144 && memcmp(&span[400], kSRGB, strlen(kSRGB)) == 0; } } // namespace |