From 86a1cace276f827bd8261e624c4839b58ffc5f15 Mon Sep 17 00:00:00 2001 From: Andi Gutmans Date: Sat, 16 Dec 2000 20:52:43 +0000 Subject: - Make all places use MAXPATHLEN in the same way. It includes the terminating NULL. --- sapi/phttpd/phttpd.c | 2 +- sapi/servlet/servlet.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'sapi') diff --git a/sapi/phttpd/phttpd.c b/sapi/phttpd/phttpd.c index 825fd2a3b5..a7abe61088 100644 --- a/sapi/phttpd/phttpd.c +++ b/sapi/phttpd/phttpd.c @@ -203,7 +203,7 @@ php_phttpd_request_ctor(PHLS_D SLS_DC) SG(request_info).query_string = PHG(cip)->hip->request; SG(request_info).request_method = PHG(cip)->hip->method; - SG(request_info).path_translated = malloc(MAXPATHLEN+1); + SG(request_info).path_translated = malloc(MAXPATHLEN); SG(sapi_headers).http_response_code = 200; if (url_expand(PHG(cip)->hip->url, SG(request_info).path_translated, MAXPATHLEN, &PHG(sb), NULL, NULL) == NULL) { /* handle error */ diff --git a/sapi/servlet/servlet.c b/sapi/servlet/servlet.c index 04a51798de..210e59c9b9 100644 --- a/sapi/servlet/servlet.c +++ b/sapi/servlet/servlet.c @@ -327,7 +327,7 @@ JNIEXPORT void JNICALL Java_net_php_servlet_send zend_file_handle file_handle; #ifndef VIRTUAL_DIR - char cwd[MAXPATHLEN+1]; + char cwd[MAXPATHLEN]; #endif SLS_FETCH(); PLS_FETCH(); -- cgit v1.2.1