Files
android/libwvdrmengine/oemcrypto/odk/test/fuzzing/odk_renewal_request_fuzz.cpp
Bharath Chandra Elluru d524d840e3 Copy submitted odk fuzzing changes from cdm repository to android
Merging odk changes from http://go/wvgerrit/98084

Copy submitted changes for oemcrypto/odk/test/fuzzing from cdm
repository to android so that fuzzer scripts in odk can be run
using go/android-fuzzing

Google3 CLs:
http://cl/301943247
http://cl/304011238
http://cl/307142293
http://cl/307087692

Bug: 150900870
Test: The fuzzer scripts can be built once the code is moved to android
tree. Odk fuzzer scripts have been verified and successfully running in
google3

Change-Id: I92b8a357c32b145c7f80bdc93d05214862368957
2020-04-21 18:42:43 +00:00

23 lines
795 B
C++

/* Copyright 2020 Google LLC. All rights reserved. This file and proprietary
* source code may only be used and distributed under the Widevine Master
* License Agreement.
*/
#include <vector>
#include "core_message_deserialize.h"
#include "fuzzing/odk_fuzz_helper.h"
namespace oemcrypto_core_message {
using oemcrypto_core_message::deserialize::CoreRenewalRequestFromMessage;
extern "C" int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
std::vector<uint8_t> out(size);
const size_t kClockValueSize = sizeof(ODK_ClockValues);
kdo_odk<ODK_RenewalRequest>(CoreRenewalRequestFromMessage,
odk_serialize_RenewalRequest, data, size,
kClockValueSize, out.data());
return 0;
}
} // namespace oemcrypto_core_message