Permalink
Browse files

Fix CVE-2012-3547. Found by Timo Warns

  • Loading branch information...
1 parent cc8f3da commit 78e5aed56c36a9231bc91ea5f55b3edf88a9d2a4 @alandekok committed Sep 10, 2012
Showing with 1 addition and 1 deletion.
  1. +1 −1 src/modules/rlm_eap/types/rlm_eap_tls/rlm_eap_tls.c
@@ -608,7 +608,7 @@ static int cbtls_verify(int ok, X509_STORE_CTX *ctx)
*/
buf[0] = '\0';
asn_time = X509_get_notAfter(client_cert);
- if ((lookup <= 1) && asn_time && (asn_time->length < MAX_STRING_LEN)) {
+ if ((lookup <= 1) && asn_time && (asn_time->length < sizeof(buf))) {
memcpy(buf, (char*) asn_time->data, asn_time->length);
buf[asn_time->length] = '\0';
pairadd(&handler->certs,

0 comments on commit 78e5aed

Please sign in to comment.