Browse Source

Fuzzer: Correct include for json fuzz

Fixes #2671
Stefan Profanter 5 years ago
parent
commit
dee5006b3d
3 changed files with 9 additions and 4 deletions
  1. 4 0
      CMakeLists.txt
  2. 3 2
      tests/fuzz/fuzz_json_decode.cc
  3. 2 2
      tests/fuzz/fuzz_json_decode_encode.cc

+ 4 - 0
CMakeLists.txt

@@ -177,6 +177,10 @@ if(UA_BUILD_FUZZING OR UA_BUILD_OSS_FUZZ OR UA_BUILD_FUZZING_CORPUS)
     set(UA_ENABLE_DISCOVERY ON CACHE STRING "" FORCE)
     set(UA_ENABLE_DISCOVERY_MULTICAST ON CACHE STRING "" FORCE)
     set(UA_ENABLE_ENCRYPTION ON CACHE STRING "" FORCE)
+    set(UA_ENABLE_HISTORIZING ON CACHE STRING "" FORCE)
+    set(UA_ENABLE_JSON_ENCODING ON CACHE STRING "" FORCE)
+    set(UA_ENABLE_SUBSCRIPTIONS ON CACHE STRING "" FORCE)
+    set(UA_ENABLE_SUBSCRIPTIONS_EVENTS ON CACHE STRING "" FORCE)
 endif()
 
 if(UA_ENABLE_DISCOVERY_MULTICAST AND NOT UA_ENABLE_DISCOVERY)

+ 3 - 2
tests/fuzz/fuzz_json_decode.cc

@@ -5,8 +5,9 @@
  *    Copyright 2018 (c) Fraunhofer IOSB (Author: Lukas Meling)
  */
 
-#include <ua_types.h>
-#include <ua_types_generated_handling.h>
+
+#include <open62541/types.h>
+#include <open62541/types_generated_handling.h>
 #include "ua_types_encoding_json.h"
 
 /*

+ 2 - 2
tests/fuzz/fuzz_json_decode_encode.cc

@@ -5,8 +5,8 @@
  *    Copyright 2018 (c) Fraunhofer IOSB (Author: Julius Pfrommer)
  */
 
-#include <ua_types.h>
-#include <ua_types_generated_handling.h>
+#include <open62541/types.h>
+#include <open62541/types_generated_handling.h>
 #include "ua_types_encoding_json.h"
 
 /* Decode a message, then encode, decode, encode.