Coverage Report

Created: 2026-08-13 07:04

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
796
#define kBufSize 4096
8
9
1.45k
int LLVMFuzzerTestOneInput(const char *data, size_t size) {
10
1.45k
    int out;
11
1.45k
    MmsValue* mmsValue = NULL;
12
1.45k
    mmsValue = MmsValue_decodeMmsData(data, 0, size, &out);
13
1.45k
    if (mmsValue == NULL) {
14
659
        return 0;
15
659
    }
16
17
796
    int dataSize = MmsValue_encodeMmsData(mmsValue, NULL, 0, false);
18
796
    if (dataSize <= 0) {
19
0
        return 0;
20
0
    }
21
    
22
796
    char printBuffer[kBufSize];
23
796
    MmsValue_printToBuffer(mmsValue, printBuffer, kBufSize);
24
25
796
    if (mmsValue != NULL) {
26
796
        MmsValue_delete(mmsValue);
27
796
    }
28
29
796
    return 0;
30
796
}