summaryrefslogtreecommitdiff
path: root/lib/gnutls_x509.c
diff options
context:
space:
mode:
authorSimon Josefsson <simon@josefsson.org>2008-09-17 13:49:03 +0200
committerSimon Josefsson <simon@josefsson.org>2008-09-17 13:49:03 +0200
commitda4aec24387636d51bb1a222602c8af18b9d15b0 (patch)
treec05e0fd4d07e09413d4d4083cc4e3737d3880e4e /lib/gnutls_x509.c
parent989371b4d672cb4dd96981e325b4c6d80106a50a (diff)
downloadgnutls-da4aec24387636d51bb1a222602c8af18b9d15b0.tar.gz
Fix overflows in gnutls_calloc calls.
Diffstat (limited to 'lib/gnutls_x509.c')
-rw-r--r--lib/gnutls_x509.c3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/gnutls_x509.c b/lib/gnutls_x509.c
index faca101f7b..924d4b146d 100644
--- a/lib/gnutls_x509.c
+++ b/lib/gnutls_x509.c
@@ -132,8 +132,7 @@ _gnutls_x509_cert_verify_peers (gnutls_session_t session,
*/
peer_certificate_list_size = info->ncerts;
peer_certificate_list =
- gnutls_calloc (1,
- peer_certificate_list_size * sizeof (gnutls_x509_crt_t));
+ gnutls_calloc (peer_certificate_list_size, sizeof (gnutls_x509_crt_t));
if (peer_certificate_list == NULL)
{
gnutls_assert ();