From: Pierre Joye Date: Mon, 6 Aug 2007 19:11:20 +0000 (+0000) Subject: - #42222, truncate the _default to the buffer size (was 200 since day #1, we don... X-Git-Tag: php-5.2.4RC2~85 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bca091229635f2e0a47f7e927f1d1d20d0a87c8f;p=php - #42222, truncate the _default to the buffer size (was 200 since day #1, we don't need dynamic alloc here) --- diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c index 032c9c25c6..781a6e6cbd 100644 --- a/ext/openssl/openssl.c +++ b/ext/openssl/openssl.c @@ -1739,7 +1739,9 @@ static int php_openssl_make_REQ(struct php_x509_request * req, X509_REQ * csr, z if (strcmp("_default", type + len) != 0) { continue; } - + if (len > 200) { + len = 200; + } memcpy(buffer, type, len); buffer[len] = '\0'; type = buffer;