1 // Copyright 2019 The PDFium Authors 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #include "testing/fuzzers/pdfium_fuzzer_util.h" 6 7 namespace { 8 void* g_fuzzer_init_per_process_state = nullptr; 9 } // namespace 10 GetInteger(const uint8_t * data)11int GetInteger(const uint8_t* data) { 12 return data[0] | (data[1] << 8) | (data[2] << 16) | (data[3] << 24); 13 } 14 FPDF_SetFuzzerPerProcessState(void * state)15FPDF_EXPORT void FPDF_CALLCONV FPDF_SetFuzzerPerProcessState(void* state) { 16 g_fuzzer_init_per_process_state = state; 17 } 18 FPDF_GetFuzzerPerProcessState()19FPDF_EXPORT void* FPDF_CALLCONV FPDF_GetFuzzerPerProcessState() { 20 return g_fuzzer_init_per_process_state; 21 } 22