]> granicus.if.org Git - php/commitdiff
- #42222, truncate the _default to the buffer size (was 200 since day #1, we don...
authorPierre Joye <pajoye@php.net>
Mon, 6 Aug 2007 19:11:20 +0000 (19:11 +0000)
committerPierre Joye <pajoye@php.net>
Mon, 6 Aug 2007 19:11:20 +0000 (19:11 +0000)
ext/openssl/openssl.c

index 032c9c25c6c759b30fdc279d113dc9e93c671802..781a6e6cbda1a924e0f8de0b40b562e6031b5f1a 100644 (file)
@@ -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;