Coverage Report

Created: 2026-06-30 06:07

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/libiec61850/fuzz/fuzz_mms_print.c
Line
Count
Source
1
#include <stdio.h>
2
#include <stdlib.h>
3
4
#include "iec61850_server.h"
5
#include "hal_thread.h"
6
7
0
#define kBufSize 4096
8
9
0
int LLVMFuzzerTestOneInput(const char *data, size_t size) {
10
0
    int out;
11
0
    MmsValue* mmsValue = NULL;
12
0
    mmsValue = MmsValue_decodeMmsData(data, 0, size, &out);
13
0
    if (mmsValue == NULL) {
14
0
        return 0;
15
0
    }
16
17
0
    int dataSize = MmsValue_encodeMmsData(mmsValue, NULL, 0, false);
18
0
    if (dataSize <= 0) {
19
0
        return 0;
20
0
    }
21
    
22
0
    char printBuffer[kBufSize];
23
0
    MmsValue_printToBuffer(mmsValue, printBuffer, kBufSize);
24
25
0
    if (mmsValue != NULL) {
26
0
        MmsValue_delete(mmsValue);
27
0
    }
28
29
0
    return 0;
30
0
}