From: Nikos Mavrogiannopoulos Date: Tue, 23 Sep 2008 18:02:39 +0000 (+0300) Subject: Corrected buffer overrun in crt_list_import. Reported and patch by Jonathan Manktelow. X-Git-Tag: gnutls_2_5_9~22 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=2c98c4fe8b2ce7deb852c9308d848c4f371c751c;p=thirdparty%2Fgnutls.git Corrected buffer overrun in crt_list_import. Reported and patch by Jonathan Manktelow. --- diff --git a/lib/x509/x509.c b/lib/x509/x509.c index 8ee8105167..8be70e1053 100644 --- a/lib/x509/x509.c +++ b/lib/x509/x509.c @@ -2826,7 +2826,7 @@ gnutls_x509_crt_list_import (gnutls_x509_crt_t * certs, } tmp.data = (void *) ptr; - tmp.size = size; + tmp.size = data->size - (ptr - (char *) data->data); ret = gnutls_x509_crt_import (certs[count], &tmp, GNUTLS_X509_FMT_PEM);