I am not able to fuzz my target properly due to input. Also I get initial seed crashed if I give it CODE128 as input #1820
Unanswered
MuqaddasHaroon
asked this question in
Q&A
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
`Hello, so I am trying to fuzz zint(a complete newbie) and the problem is that my initial input is taken as half, for example, CODE128 is taken as CODE only, I need to first let it hit all the branches using the correct input. Can anyone help me with this? This is my code
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <stdint.h> // Include this header for uint8_t
#include "zint.h"
// The target function to be fuzzed
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
// Initialize Zint
struct zint_symbol* symbol = ZBarcode_Create();
// Set the input data as the message to be encoded
ZBarcode_Encode_and_Buffer(symbol, data, size, 0);
// Free resources
ZBarcode_Delete(symbol);
return 0;
}
Beta Was this translation helpful? Give feedback.
All reactions