Coverage Report

Created: 2026-01-09 07:12

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/coturn/fuzzing/FuzzStunClient.c
Line
Count
Source
1
#include <stdio.h>
2
#include <stdlib.h>
3
#include <string.h>
4
5
#include "apputils.h"
6
#include "ns_turn_utils.h"
7
#include "stun_buffer.h"
8
9
446
#define kMinInputLength 10
10
217
#define kMaxInputLength 5120
11
12
extern int LLVMFuzzerTestOneInput(const uint8_t *Data,
13
223
                                  size_t Size) { // stunclient.c
14
15
223
  if (Size < kMinInputLength || Size > kMaxInputLength) {
16
25
    return 1;
17
25
  }
18
19
198
  stun_buffer buf;
20
21
198
  buf.len = Size;
22
198
  memcpy(buf.buf, Data, buf.len);
23
24
198
  if (stun_is_command_message(&buf)) {
25
52
    if (stun_is_response(&buf)) {
26
45
      if (stun_is_success_response(&buf)) {
27
35
        if (stun_is_binding_response(&buf)) {
28
18
          return 0;
29
18
        }
30
35
      }
31
45
    }
32
52
  }
33
34
180
  return 1;
35
198
}