Coverage Report

Created: 2026-08-31 07:12

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/tinyobjloader/fuzzer/fuzz_tobj_c.c
Line
Count
Source
1
/*
2
 * fuzz_tobj_c.c -- libFuzzer/AFL entry for the pure C11 loader.
3
 *
4
 * Build (libFuzzer):
5
 *   clang -std=c11 -g -O1 -fsanitize=address,undefined,fuzzer \
6
 *     -DTOBJ_ENABLE_FILE_IO -I.. fuzz_tobj_c.c ../tiny_obj_c.c ../tobj_tess.c \
7
 *     -o fuzz_tobj_c
8
 *
9
 * tobj_fuzz_one parses the input from memory and frees the scene; the harness
10
 * asserts only that it returns (no crash / hang / leak / UB).
11
 */
12
#include "tiny_obj_c.h"
13
14
3.65k
int LLVMFuzzerTestOneInput(const uint8_t *data, size_t size) {
15
3.65k
  return tobj_fuzz_one(data, size);
16
3.65k
}