Coverage Report

Created: 2025-11-11 06:30

next uncovered line (L), next uncovered region (R), next uncovered branch (B)
/src/openssh/regress/misc/fuzz-harness/sshsigopt_fuzz.cc
Line
Count
Source
1
#include <stddef.h>
2
#include <stdio.h>
3
#include <stdint.h>
4
#include <string.h>
5
#include <stdlib.h>
6
7
extern "C" {
8
9
#include "sshsig.h"
10
11
int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
12
797
{
13
797
  char *cp = (char *)malloc(size + 1);
14
797
  struct sshsigopt *opts = NULL;
15
16
797
  if (cp == NULL)
17
0
    goto out;
18
797
  memcpy(cp, data, size);
19
797
  cp[size] = '\0';
20
797
  if ((opts = sshsigopt_parse(cp, "libfuzzer", 0, NULL)) == NULL)
21
622
    goto out;
22
23
797
 out:
24
797
  free(cp);
25
797
  sshsigopt_free(opts);
26
797
  return 0;
27
797
}
28
29
} // extern "C"