]> git.ipfire.org Git - thirdparty/gnutls.git/commitdiff
Corrected bug in gnutls_pcert_list_import_x509_raw().
authorNikos Mavrogiannopoulos <nmav@gnutls.org>
Sat, 15 Feb 2014 09:06:21 +0000 (10:06 +0100)
committerNikos Mavrogiannopoulos <nmav@gnutls.org>
Sat, 15 Feb 2014 09:09:04 +0000 (10:09 +0100)
The bug caused gnutls_pcert_list_import_x509_raw() to crash if
gnutls_x509_crt_list_import() would fail with the provided data.
Reported by Dmitriy Anisimkov.

Conflicts:
lib/gnutls_pcert.c

lib/gnutls_pcert.c

index 433a7c67850be96c20fa7c908d1950e9fe3f8a4a..5ea716de5477455c825043c48f8cef82d2a55db1 100644 (file)
@@ -123,7 +123,7 @@ gnutls_x509_crt_t *crt;
   if (ret < 0)
     {
       ret = gnutls_assert_val(ret);
-      goto cleanup;
+      goto cleanup_crt;
     }
   
   for (i=0;i<*pcert_max;i++)
@@ -147,9 +147,9 @@ cleanup:
   for (i=0;i<*pcert_max;i++)
     gnutls_x509_crt_deinit(crt[i]);
 
+cleanup_crt:
   gnutls_free(crt);
   return ret;
-
 }
 
 /**