From: Alan T. DeKok Date: Mon, 10 Sep 2012 06:20:13 +0000 (+0200) Subject: Fix CVE-2012-3547. Found by Timo Warns. X-Git-Tag: release_3_0_0_beta1~1720 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=6f23e66b4755350248f8dd2b56ee71bb9643448c;p=thirdparty%2Ffreeradius-server.git Fix CVE-2012-3547. Found by Timo Warns. --- diff --git a/src/main/tls.c b/src/main/tls.c index beb48216b7f..ab061bc9a72 100644 --- a/src/main/tls.c +++ b/src/main/tls.c @@ -1380,7 +1380,7 @@ int cbtls_verify(int ok, X509_STORE_CTX *ctx) buf[0] = '\0'; asn_time = X509_get_notAfter(client_cert); if (identity && (lookup <= 1) && asn_time && - (asn_time->length < MAX_STRING_LEN)) { + (asn_time->length < sizeof(buf))) { memcpy(buf, (char*) asn_time->data, asn_time->length); buf[asn_time->length] = '\0'; pairadd(certs,