mirror of https://github.com/google/oss-fuzz.git
Fix UBSAN error with function argument casting. (#362)
This commit is contained in:
parent
0854c71ab4
commit
6bbfc0b62f
|
@ -19,10 +19,10 @@
|
|||
#include <plist/plist.h>
|
||||
#include <stdio.h>
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const char* data, size_t size)
|
||||
extern "C" int LLVMFuzzerTestOneInput(const unsigned char* data, size_t size)
|
||||
{
|
||||
plist_t root_node = NULL;
|
||||
plist_from_bin(data, size, &root_node);
|
||||
plist_from_bin(reinterpret_cast<const char*>(data), size, &root_node);
|
||||
plist_free(root_node);
|
||||
|
||||
return 0;
|
||||
|
|
|
@ -19,10 +19,10 @@
|
|||
#include <plist/plist.h>
|
||||
#include <stdio.h>
|
||||
|
||||
extern "C" int LLVMFuzzerTestOneInput(const char* data, size_t size)
|
||||
extern "C" int LLVMFuzzerTestOneInput(const unsigned char* data, size_t size)
|
||||
{
|
||||
plist_t root_node = NULL;
|
||||
plist_from_xml(data, size, &root_node);
|
||||
plist_from_xml(reinterpret_cast<const char*>(data), size, &root_node);
|
||||
plist_free(root_node);
|
||||
|
||||
return 0;
|
||||
|
|
Loading…
Reference in New Issue