Coverage Report

Created: 2026-05-16 06:38

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/skcms/fuzz/fuzz_iccprofile_atf.c
Line
Count
Source
1
/*
2
 * Copyright 2018 Google Inc.
3
 *
4
 * Use of this source code is governed by a BSD-style license that can be
5
 * found in the LICENSE file.
6
 */
7
8
// This fuzz target parses an ICCProfile and then computes the
9
// approximateTransferFunction.  This is separate from fuzz_iccprofile_info
10
// because it is a much more time-consuming function call.
11
12
#include "../src/skcms_public.h"
13
14
int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size);
15
0
int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size) {
16
0
    skcms_ICCProfile p;
17
0
    if (!skcms_Parse(data, size, &p)) {
18
0
        return 0;
19
0
    }
20
21
0
    skcms_TransferFunction tf;
22
0
    float max_error;
23
0
    for (int i = 0; i < 3; ++i) {
24
0
        (void)skcms_ApproximateCurve(&p.trc[i], &tf, &max_error);
25
0
        (void)max_error;
26
0
    }
27
28
0
    return 0;
29
0
}