mirror of
https://github.com/open62541/open62541.git
synced 2026-10-29 05:11:36 +08:00
feat(tests): Decoding of JSON (we encoded) must succeed in fuzzing
This commit is contained in:
committed by
Julius Pfrommer
parent
13c94be60a
commit
9a1663bdb7
@@ -38,12 +38,7 @@ LLVMFuzzerTestOneInput(uint8_t *data, size_t size) {
|
||||
UA_Variant value2;
|
||||
UA_Variant_init(&value2);
|
||||
retval = UA_decodeJson(&buf2, &value2, &UA_TYPES[UA_TYPES_VARIANT], NULL);
|
||||
if(retval != UA_STATUSCODE_GOOD) {
|
||||
UA_Variant_clear(&value);
|
||||
UA_ByteString_clear(&buf2);
|
||||
return 0;
|
||||
}
|
||||
|
||||
UA_assert(retval == UA_STATUSCODE_GOOD);
|
||||
UA_assert(UA_order(&value, &value2, &UA_TYPES[UA_TYPES_VARIANT]) == UA_ORDER_EQ);
|
||||
UA_Variant_clear(&value);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user