pnoltes commented on code in PR #799:
URL: https://github.com/apache/celix/pull/799#discussion_r2617384277
##########
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:
Look into this, but I think this is not really feasible. The fuzz testing is
focused on fuzzing a single input buffer and for filter match you need two
(properties and a filter).
--
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]