pnoltes commented on code in PR #799:
URL: https://github.com/apache/celix/pull/799#discussion_r2373031315


##########
libs/utils/fuzzing/src/FilterFuzz.cc:
##########
@@ -0,0 +1,23 @@
+#include <celix_filter.h>
+#include <celix_err.h>
+#include <cstdint>
+#include <cstdlib>
+#include <cstring>
+
+int filterParseFuzzOneInput(const uint8_t* data, size_t size) {
+    char* buffer = static_cast<char*>(malloc(size + 1));
+    if (buffer == nullptr) {
+        return 0;
+    }
+    memcpy(buffer, data, size);
+    buffer[size] = '\0';
+
+    celix_filter_t* filter = celix_filter_create(buffer);

Review Comment:
   Good point, I will look into add filter match as fuzz test entry.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to