Coverage Report

Created: 2025-11-24 06:34

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.32k
#define kMinInputLength 10
12
656
#define kMaxInputLength 5120
13
14
extern int LLVMFuzzerTestOneInput(const uint8_t *Data,
15
662
                                  size_t Size) { // rfc5769check
16
17
662
  if (Size < kMinInputLength || Size > kMaxInputLength) {
18
25
    return 1;
19
25
  }
20
21
637
  stun_is_command_message_full_check_str((uint8_t *)Data, Size, 1, NULL);
22
23
637
  uint8_t uname[33];
24
637
  uint8_t realm[33];
25
637
  uint8_t upwd[33];
26
637
  strcpy((char *)upwd, "VOkJxbRl1RmTxUk/WvJxBt");
27
637
  stun_check_message_integrity_str(TURN_CREDENTIALS_SHORT_TERM, (uint8_t *)Data, Size, uname, realm, upwd, shatype);
28
637
  return 0;
29
662
}