44 fprintf( stderr,
"test-fuzzer: code=%d domain=%s ",
code, domain);
45 vfprintf (stderr,
format, args);
46 fprintf (stderr,
"\n");
57 buf[
sizeof(buf)-1] = 0;
58 buf[
sizeof(buf)-2] = 0;
62 if (buf[
sizeof(buf)-2] != 0) abort();
80 fprintf (stdout,
"Byte order: %s\n",
85 fprintf (stderr,
"Could not parse maker note!\n");
93 for (i = 0; i < c; i++) {
106 int main(
const int argc,
const char *argv[])
111 unsigned int xbuf_size;
121 #ifdef __AFL_HAVE_MANUAL_CONTROL
125 unsigned char *buf = __AFL_FUZZ_TESTCASE_BUF;
128 while (__AFL_LOOP(10000)) {
130 int len = __AFL_FUZZ_TESTCASE_LEN;
const char * exif_byte_order_get_name(ExifByteOrder order)
Return a short, localized, textual name for the given byte order.
@ EXIF_BYTE_ORDER_INTEL
Little-endian byte order.
ExifIfd exif_content_get_ifd(ExifContent *c)
Return the IFD number in which the given ExifContent is found.
void exif_content_foreach_entry(ExifContent *content, ExifContentForeachEntryFunc func, void *data)
Executes function on each EXIF tag in this IFD in turn.
void exif_data_set_byte_order(ExifData *data, ExifByteOrder order)
Set the byte order to use for this EXIF data.
void exif_data_unref(ExifData *data)
ExifByteOrder exif_data_get_byte_order(ExifData *data)
Return the byte order in use by this EXIF structure.
ExifData * exif_data_new_from_data(const unsigned char *data, unsigned int size)
Allocate a new ExifData and load EXIF data from a memory buffer.
ExifMnoteData * exif_data_get_mnote_data(ExifData *d)
Return the MakerNote data out of the EXIF data.
void exif_data_save_data(ExifData *data, unsigned char **d, unsigned int *ds)
Store raw EXIF data representing the ExifData structure into a memory buffer.
void exif_data_foreach_content(ExifData *data, ExifDataForeachContentFunc func, void *user_data)
Execute a function on each IFD in turn.
void exif_data_log(ExifData *data, ExifLog *log)
Set the log message object for all IFDs.
Defines the ExifData type and the associated functions.
const char * exif_entry_get_value(ExifEntry *e, char *val, unsigned int maxlen)
Return a localized textual representation of the value of the EXIF entry.
ExifLoader * exif_loader_new(void)
Allocate a new ExifLoader.
void exif_loader_unref(ExifLoader *loader)
Decrease the refcount of the ExifLoader.
ExifData * exif_loader_get_data(ExifLoader *loader)
Create an ExifData from the data in the loader.
unsigned char exif_loader_write(ExifLoader *eld, unsigned char *buf, unsigned int len)
Load a buffer into the ExifLoader from a memory buffer.
Defines the ExifLoader type.
void exif_log_set_func(ExifLog *log, ExifLogFunc func, void *data)
Register log callback function.
ExifLog * exif_log_new(void)
Create a new logging instance.
void exif_mnote_data_ref(ExifMnoteData *d)
char * exif_mnote_data_get_value(ExifMnoteData *d, unsigned int n, char *val, unsigned int maxlen)
Return a textual representation of the value of the MakerNote entry.
const char * exif_mnote_data_get_name(ExifMnoteData *d, unsigned int n)
Returns textual name of the given MakerNote tag.
const char * exif_mnote_data_get_description(ExifMnoteData *d, unsigned int n)
Returns verbose textual description of the given MakerNote tag.
const char * exif_mnote_data_get_title(ExifMnoteData *d, unsigned int n)
Returns textual title of the given MakerNote tag.
unsigned int exif_mnote_data_count(ExifMnoteData *d)
Return the number of tags in the MakerNote.
void exif_mnote_data_unref(ExifMnoteData *d)
System specific definitions, not for installation!
const char * exif_tag_get_name(ExifTag tag)
Represents the entire EXIF data found in an image.
Data found in one EXIF tag.
ExifFormat format
Type of data in this entry.
ExifTag tag
EXIF tag for this entry.
void data_foreach_func(ExifContent *content, void *callback_data)
static int test_exif_data(ExifData *d)
int main(const int argc, const char *argv[])
void content_foreach_func(ExifEntry *entry, void *callback_data)
__AFL_FUZZ_INIT()
Persistent AFL fuzzing binary (reaches 4 digits execs / second)