diff options
| author | Pierre Joye <pajoye@php.net> | 2007-08-06 19:11:20 +0000 |
|---|---|---|
| committer | Pierre Joye <pajoye@php.net> | 2007-08-06 19:11:20 +0000 |
| commit | bca091229635f2e0a47f7e927f1d1d20d0a87c8f (patch) | |
| tree | b7bce592e761013a71dd648f2cabb0043820c3a3 | |
| parent | c07aeab86892a984d27d07a608fba50b0fc58e71 (diff) | |
| download | php-git-bca091229635f2e0a47f7e927f1d1d20d0a87c8f.tar.gz | |
- #42222, truncate the _default to the buffer size (was 200 since day #1, we don't need dynamic alloc here)
| -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 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; |
