summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--fuzz/gnutls_pkcs12_key_parser_fuzzer.repro/dcbb6c7d385ddf87823849890768b022dc9e1effbin0 -> 1011 bytes
-rw-r--r--lib/x509/pkcs12.c3
2 files changed, 3 insertions, 0 deletions
diff --git a/fuzz/gnutls_pkcs12_key_parser_fuzzer.repro/dcbb6c7d385ddf87823849890768b022dc9e1eff b/fuzz/gnutls_pkcs12_key_parser_fuzzer.repro/dcbb6c7d385ddf87823849890768b022dc9e1eff
new file mode 100644
index 0000000000..ebc03d30dc
--- /dev/null
+++ b/fuzz/gnutls_pkcs12_key_parser_fuzzer.repro/dcbb6c7d385ddf87823849890768b022dc9e1eff
Binary files differ
diff --git a/lib/x509/pkcs12.c b/lib/x509/pkcs12.c
index 8c3310d066..6324fb25a3 100644
--- a/lib/x509/pkcs12.c
+++ b/lib/x509/pkcs12.c
@@ -867,6 +867,9 @@ _gnutls_pkcs12_gost_string_to_key(gnutls_mac_algorithm_t algo,
size_t temp_len = sizeof(temp);
unsigned int pass_len = 0;
+ if (iter == 0)
+ return gnutls_assert_val(GNUTLS_E_INVALID_REQUEST);
+
if (pass)
pass_len = strlen(pass);