summaryrefslogtreecommitdiffstats
path: root/libfreerdp/common/test/TestFuzzCommonAssistanceHexStringToBin.c
blob: b0847d87f8236afdcf3ea0a8eb181bb0ec04186b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
#include <freerdp/assistance.h>

int LLVMFuzzerTestOneInput(const uint8_t* Data, size_t Size)
{
	char* buf = calloc(Size + 1, sizeof(char));
	if (buf == NULL)
		return 0;
	memcpy(buf, Data, Size);
	buf[Size] = '\0';

	BYTE* pass = freerdp_assistance_hex_string_to_bin((void*)buf, &Size);
	free(pass);
	free(buf);

	return 0;
}