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. --- ext/dba/dba.c | 10 ++++++++++ ext/standard/dir.c | 2 +- 2 files changed, 11 insertions(+), 1 deletion(-) (limited to 'ext') diff --git a/ext/dba/dba.c b/ext/dba/dba.c index c432b70018..053861aadc 100644 --- a/ext/dba/dba.c +++ b/ext/dba/dba.c @@ -211,11 +211,21 @@ static PHP_MSHUTDOWN_FUNCTION(dba) static PHP_MINFO_FUNCTION(dba) { dba_handler *hptr; +<<<<<<< dba.c + static char handlers[80]; +======= smart_str handlers = {0}; +>>>>>>> 1.28 + + handlers[0] = '\0'; for(hptr = handler; hptr->name; hptr++) { +<<<<<<< dba.c + strlcat(handlers, hptr->name, sizeof(handlers)); +======= smart_str_appends(&handlers, hptr->name); smart_str_appendc(&handlers, ' '); +>>>>>>> 1.28 } php_info_print_table_start(); diff --git a/ext/standard/dir.c b/ext/standard/dir.c index 131540816a..97f2ac89c6 100644 --- a/ext/standard/dir.c +++ b/ext/standard/dir.c @@ -259,7 +259,7 @@ PHP_FUNCTION(getcwd) } #if HAVE_GETCWD - ret = V_GETCWD(path,MAXPATHLEN-1); + ret = V_GETCWD(path, MAXPATHLEN); #elif HAVE_GETWD ret = V_GETWD(path); /* -- cgit v1.2.1