diff options
author | Pierre Joye <pajoye@php.net> | 2007-08-06 19:13:05 +0000 |
---|---|---|
committer | Pierre Joye <pajoye@php.net> | 2007-08-06 19:13:05 +0000 |
commit | 0f55627deeb6a9db41ca3649d76a913af4ca447d (patch) | |
tree | 7462baf9d219d1f6ba5934305c19273c09299c37 /ext/openssl/openssl.c | |
parent | f3c9b3ec86cec0e047316da2e67b1aaaa547076c (diff) | |
download | php-git-0f55627deeb6a9db41ca3649d76a913af4ca447d.tar.gz |
- MFB: #42222, truncate the _default to the buffer size (was 200 since day #1, we don't need dynamic alloc here)
Diffstat (limited to 'ext/openssl/openssl.c')
-rw-r--r-- | ext/openssl/openssl.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/ext/openssl/openssl.c b/ext/openssl/openssl.c index d583220965..7b85cbd2f1 100644 --- a/ext/openssl/openssl.c +++ b/ext/openssl/openssl.c @@ -1814,7 +1814,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; |