Coverage Report

Created: 2026-01-17 06:15

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
842
extern "C" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size) {
16
842
    using namespace std;
17
842
    using namespace OpenBabel;
18
842
    OBConversion obconv;
19
842
    OpenBabel::OBMol obmol;
20
842
    std::string str (reinterpret_cast<const char*>(Data), Size);
21
22
    //FUZZ_INPUT_FORMAT is defined at compile time
23
842
    if(!obconv.SetInFormat(FUZZ_INPUT_FORMAT)){
24
0
        abort();
25
0
    }
26
842
    obconv.ReadString(&obmol, str);
27
842
    return 0;
28
842
}
29