xref: /freebsd/crypto/openssh/regress/misc/fuzz-harness/pubkey_fuzz.cc (revision f81cdf24ba5436367377f7c8e8f51f6df2a75ca7)
1 #include <stddef.h>
2 #include <stdio.h>
3 #include <stdint.h>
4 
5 extern "C" {
6 
7 #include "sshkey.h"
8 
9 int LLVMFuzzerTestOneInput(const uint8_t* data, size_t size)
10 {
11 	struct sshkey *k = NULL;
12 	int r = sshkey_from_blob(data, size, &k);
13 	if (r == 0) sshkey_free(k);
14 	return 0;
15 }
16 
17 } // extern
18 
19