EXIF library (libexif) Internals  0.6.24
test-fuzzer-persistent.c File Reference
#include <string.h>
#include <unistd.h>
#include <stdio.h>
#include <stdlib.h>
#include <sys/stat.h>
#include "libexif/exif-data.h"
#include "libexif/exif-loader.h"
#include "libexif/exif-system.h"
Include dependency graph for test-fuzzer-persistent.c:

Go to the source code of this file.

Functions

 __AFL_FUZZ_INIT ()
 Persistent AFL fuzzing binary (reaches 4 digits execs / second) More...
 
void content_foreach_func (ExifEntry *entry, void *callback_data)
 
void content_foreach_func (ExifEntry *entry, void *UNUSED(callback_data))
 
void data_foreach_func (ExifContent *content, void *callback_data)
 
static int test_exif_data (ExifData *d)
 
int main (const int argc, const char *argv[])
 

Function Documentation

◆ __AFL_FUZZ_INIT()

__AFL_FUZZ_INIT ( )

Persistent AFL fuzzing binary (reaches 4 digits execs / second)

file test-fuzzer-persistent.c from test-parse.c and test-mnote.c

Copyright (C) 2007 Hans Ulrich Niedermann gp@n-.nosp@m.dime.nosp@m.nsion.nosp@m.al.d.nosp@m.e Copyright 2002 Lutz Mueller lutz@.nosp@m.user.nosp@m.s.sou.nosp@m.rcef.nosp@m.orge..nosp@m.net

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.

◆ content_foreach_func() [1/2]

void content_foreach_func ( ExifEntry entry,
void *  callback_data 
)

Callback function handling an ExifEntry.

Referenced by data_foreach_func().

◆ content_foreach_func() [2/2]

void content_foreach_func ( ExifEntry entry,
void *  UNUSEDcallback_data 
)

Definition at line 52 of file test-fuzzer-persistent.c.

References exif_entry_get_value(), exif_format_get_name(), exif_tag_get_name(), _ExifEntry::format, and _ExifEntry::tag.

Here is the call graph for this function:

◆ data_foreach_func()

void data_foreach_func ( ExifContent content,
void *  callback_data 
)

Callback function handling an ExifContent (corresponds 1:1 to an IFD).

Definition at line 68 of file test-fuzzer-persistent.c.

References content_foreach_func(), exif_content_foreach_entry(), and exif_content_get_ifd().

Referenced by main().

Here is the call graph for this function:

◆ main()

int main ( const int  argc,
const char *  argv[] 
)

Main program.

Definition at line 106 of file test-fuzzer-persistent.c.

References data_foreach_func(), EXIF_BYTE_ORDER_INTEL, exif_data_foreach_content(), exif_data_log(), exif_data_new_from_data(), exif_data_save_data(), exif_data_set_byte_order(), exif_data_unref(), exif_loader_get_data(), exif_loader_new(), exif_loader_unref(), exif_loader_write(), exif_log_new(), exif_log_set_func(), and test_exif_data().

Here is the call graph for this function:

◆ test_exif_data()

static int test_exif_data ( ExifData d)
static

Definition at line 74 of file test-fuzzer-persistent.c.

References exif_byte_order_get_name(), exif_data_get_byte_order(), exif_data_get_mnote_data(), exif_mnote_data_count(), exif_mnote_data_get_description(), exif_mnote_data_get_name(), exif_mnote_data_get_title(), exif_mnote_data_get_value(), exif_mnote_data_ref(), exif_mnote_data_unref(), and name.

Referenced by main().

Here is the call graph for this function:

libexif Generated by doxygen