aboutsummaryrefslogtreecommitdiff
path: root/testing/fuzzers/pdf_cfx_barcode_fuzzer.cc
diff options
context:
space:
mode:
authorAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-12-13 18:05:38 +0000
committerAndroid Build Coastguard Worker <android-build-coastguard-worker@google.com>2023-12-13 18:05:38 +0000
commite03171e52ec4232369ab3b46e11d3a0abe1eb630 (patch)
tree6a57f6a0948032e6ec387c22d8b462215e6ca1e4 /testing/fuzzers/pdf_cfx_barcode_fuzzer.cc
parent8bbfdf2fca7197a0eccfef7b6fc27c590a44e7f7 (diff)
parent326d96bf5d52fdcf790b467b13f58ba3df3e81e4 (diff)
downloadpdfium-android14-platform-release.tar.gz
Change-Id: If925f85c6a039b56ff549fd5327795f57b9cd12c
Diffstat (limited to 'testing/fuzzers/pdf_cfx_barcode_fuzzer.cc')
-rw-r--r--testing/fuzzers/pdf_cfx_barcode_fuzzer.cc7
1 files changed, 3 insertions, 4 deletions
diff --git a/testing/fuzzers/pdf_cfx_barcode_fuzzer.cc b/testing/fuzzers/pdf_cfx_barcode_fuzzer.cc
index 7b31b2ba4..35afec9ce 100644
--- a/testing/fuzzers/pdf_cfx_barcode_fuzzer.cc
+++ b/testing/fuzzers/pdf_cfx_barcode_fuzzer.cc
@@ -1,9 +1,7 @@
-// Copyright 2017 The PDFium Authors. All rights reserved.
+// Copyright 2017 The PDFium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include <memory>
-
#include "core/fxcrt/fx_string.h"
#include "fxbarcode/cfx_barcode.h"
@@ -11,7 +9,8 @@ extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
if (size < 2 * sizeof(uint16_t))
return 0;
- BC_TYPE type = static_cast<BC_TYPE>(data[0] % (BC_LAST + 1));
+ BC_TYPE type =
+ static_cast<BC_TYPE>(data[0] % (static_cast<int>(BC_TYPE::kLast) + 1));
// Only used one byte, but align with uint16_t for string below.
data += sizeof(uint16_t);