From bca091229635f2e0a47f7e927f1d1d20d0a87c8f Mon Sep 17 00:00:00 2001 From: Pierre Joye Date: Mon, 6 Aug 2007 19:11:20 +0000 Subject: [PATCH] - #42222, truncate the _default to the buffer size (was 200 since day #1, we don't need dynamic alloc here) --- ext/openssl/openssl.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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; -- 2.50.1