Coverage Report

Created: 2026-05-14 06:30

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/openbabel/test/fuzz/fuzz_obconversion.cpp
Line
Count
Source
1
#include <stdio.h>
2
#include <stdlib.h>
3
#include <stdint.h>
4
#include <stdarg.h>
5
#include <string.h>
6
7
#include <openbabel/babelconfig.h>
8
#include <openbabel/mol.h>
9
#include <openbabel/obconversion.h>
10
#include <cstdlib>
11
#include <stdio.h>
12
#include <iostream>
13
14
15
10.3k
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
16
10.3k
    using namespace std;
17
10.3k
    using namespace OpenBabel;
18
10.3k
    OBConversion obconv;
19
10.3k
    OpenBabel::OBMol obmol;
20
10.3k
    std::string str (reinterpret_cast<const char*>(Data), Size);
21
22
    //FUZZ_INPUT_FORMAT is defined at compile time
23
10.3k
    if(!obconv.SetInFormat(FUZZ_INPUT_FORMAT)){
24
0
        abort();
25
0
    }
26
10.3k
    obconv.ReadString(&obmol, str);
27
10.3k
    return 0;
28
10.3k
}
29