Coverage Report

Created: 2026-01-10 06:14

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/coturn/fuzzing/FuzzStun.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
static SHATYPE shatype = SHATYPE_SHA1;
10
11
1.31k
#define kMinInputLength 10
12
652
#define kMaxInputLength 5120
13
14
extern int LLVMFuzzerTestOneInput(const uint8_t *Data,
15
658
                                  size_t Size) { // rfc5769check
16
17
658
  if (Size < kMinInputLength || Size > kMaxInputLength) {
18
24
    return 1;
19
24
  }
20
21
634
  stun_is_command_message_full_check_str((uint8_t *)Data, Size, 1, NULL);
22
23
634
  uint8_t uname[33];
24
634
  uint8_t realm[33];
25
634
  uint8_t upwd[33];
26
634
  strcpy((char *)upwd, "VOkJxbRl1RmTxUk/WvJxBt");
27
634
  stun_check_message_integrity_str(TURN_CREDENTIALS_SHORT_TERM, (uint8_t *)Data, Size, uname, realm, upwd, shatype);
28
634
  return 0;
29
658
}