[gnutls-devel] libtasn1 | Add initial fuzzing implementation (!38)

Development of GNU's TLS library gnutls-devel at lists.gnutls.org
Wed Jul 31 18:05:29 CEST 2019




Nikos Mavrogiannopoulos started a new discussion on fuzz/libtasn1_encoding_fuzzer.c: https://gitlab.com/gnutls/libtasn1/merge_requests/38#note_198364844

> +	g_size = size;
> +
> +	int rc = asn1_parser2tree("pkix.asn", &definitions, errorDescription);
> +	if (rc != ASN1_SUCCESS)
> +		return 0;
> +
> +	rc = asn1_create_element(definitions, "TEST_TREE.Koko", &asn1_element);
> +	if (rc != ASN1_SUCCESS)
> +		goto out;
> +
> +	size_t vlen = size <= 32 ? size : 32;
> +	value = malloc(vlen);
> +	memcpy(value, data, vlen);
> +
> +	size_t vlen0 = vlen ? vlen - 1 : 0;
> +	value0 = malloc(vlen0 + 1);

same here

-- 
Reply to this email directly or view it on GitLab: https://gitlab.com/gnutls/libtasn1/merge_requests/38#note_198364844
You're receiving this email because of your account on gitlab.com.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.gnupg.org/pipermail/gnutls-devel/attachments/20190731/761f37b3/attachment.html>


More information about the Gnutls-devel mailing list