856e33a9f1
CI / lint (push) Successful in 9s
CI / lint (pull_request) Successful in 8s
CI / build-and-test (push) Successful in 54s
CI / sanitizers (address) (push) Successful in 14s
CI / sanitizers (undefined) (push) Successful in 15s
CI / fuzz-build (push) Successful in 53s
CI / coverage (push) Successful in 22s
CI / valgrind (push) Successful in 26s
CI / build-and-test (pull_request) Successful in 53s
CI / sanitizers (address) (pull_request) Successful in 14s
CI / sanitizers (undefined) (pull_request) Successful in 14s
CI / fuzz-build (pull_request) Successful in 37s
CI / valgrind (pull_request) Successful in 27s
CI / coverage (pull_request) Successful in 1m36s
Critical fixes: - Add missing #include <string.h> to 5 fuzz targets (wouldn't compile with GCC14+/Clang16+) - Fix fuzz_metadata_from_buf.c OOB read: guard size >= sizeof(int) + FILE_METADATA_WIRE_SIZE - Add Clang compiler check for ENABLE_FUZZ in CMakeLists.txt (fail fast at configure time) - Add fuzz-build CI job (install clang, build all 6 fuzz targets with ENABLE_FUZZ=ON) Warning fixes: - Add UBSan to sanitizer CI matrix (address + undefined) - Remove tautological test_property_glob_consistency (pure/deterministic function) - Use fixed seed srand(42) instead of srand(time(NULL)) for reproducible property tests - Add valid-header + truncated-instructions delta robustness test (exercises instruction-loop error paths) - Fix lcov --remove to exclude '*/_deps/*' (xxhash coverage pollution) - Add comment explaining FASTSYNC_UNDER_VALGRIND skip in test_file.c - Update .gitignore for build-*/ directories
27 lines
455 B
C
27 lines
455 B
C
#include "chunk.h"
|
|
#include "data.h"
|
|
#include <stdint.h>
|
|
#include <stdlib.h>
|
|
#include <string.h>
|
|
|
|
int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
|
|
if (size == 0)
|
|
return 0;
|
|
|
|
void* buf = malloc(size);
|
|
if (!buf)
|
|
return 0;
|
|
memcpy(buf, data, size);
|
|
|
|
Data* d = data_create(buf, size);
|
|
if (!d)
|
|
return 0;
|
|
|
|
Chunk* chunk = chunk_deserialize(d, false);
|
|
if (chunk)
|
|
chunk_destroy(chunk);
|
|
|
|
data_destroy(d);
|
|
return 0;
|
|
}
|