1234567891011121314151617181920212223242526272829303132 |
- #include <open62541/types.h>
- #include <open62541/types_generated_handling.h>
- #include "ua_types_encoding_json.h"
- extern "C" int
- LLVMFuzzerTestOneInput(uint8_t *data, size_t size) {
- UA_ByteString buf;
- buf.data = (UA_Byte*)data;
- buf.length = size;
- UA_Variant out;
- UA_Variant_init(&out);
- UA_StatusCode retval = UA_decodeJson(&buf, &out, &UA_TYPES[UA_TYPES_VARIANT]);
- if(retval == UA_STATUSCODE_GOOD)
- UA_Variant_deleteMembers(&out);
- return 0;
- }
|