Coverage Report

Created: 2026-05-16 06:54

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/open62541_15/tests/fuzz/fuzz_base64_decode.cc
Line
Count
Source
1
/* This Source Code Form is subject to the terms of the Mozilla Public
2
 * License, v. 2.0. If a copy of the MPL was not distributed with this
3
 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
4
 *
5
 *    Copyright 2019 (c) fortiss (Author: Stefan Profanter)
6
 */
7
8
9
10
/*
11
** Main entry point.  The fuzzer invokes this function with each
12
** fuzzed input.
13
*/
14
#include <base64.h>
15
#include <malloc.h>
16
17
extern "C" int
18
396
LLVMFuzzerTestOneInput(uint8_t *data, size_t size) {
19
396
    size_t retLen;
20
396
    unsigned char* ret = UA_unbase64(data, size, &retLen);
21
396
    if (retLen > 0)
22
379
        free(ret);
23
396
    return 0;
24
396
}