Date: Tue, 7 May 2002 14:16:07 +0200 (CEST) From: Jason <jason@jase.org> To: FreeBSD-gnats-submit@FreeBSD.org Cc: <dirk@FreeBSD.org> Subject: ports/37825: mod_php4 lang/php4 mkdir bug (includes fix). Message-ID: <20020507121607.ADE18EC@angel.bluelight.nu>
next in thread | raw e-mail | index | archive | help
>Number: 37825 >Category: ports >Synopsis: mod_php4 lang/php4 mkdir bug (includes fix). >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-ports >State: open >Quarter: >Keywords: >Date-Required: >Class: maintainer-update >Submitter-Id: current-users >Arrival-Date: Tue May 07 05:20:03 PDT 2002 >Closed-Date: >Last-Modified: >Originator: Jason Taylor >Release: FreeBSD 4.5-RELEASE i386 >Organization: >Environment: System: FreeBSD angel.bluelight.nu 4.5-RELEASE FreeBSD 4.5-RELEASE #0: Tue Feb 5 05:30:41 CET 2002 root@angel.bluelight.nu:/usr/src/sys/compile/angel i386 >Description: www/mod_php4 && lang/php4 version 4.2.0 have a bug with mkdir(). See: http://bugs.php.net/bug.php?id=16905 >How-To-Repeat: mkdir("lsd|dfdf"); // Will produce segmentation fault >Fix: This bug has been fixed in the upcomming php 4.2.1. But the patch below will fix in 4.2.0. I added it to the files directory and tested with both the apache module and standalone release. --- patch-ext_mkdir begins here --- --- ext/standard/file.c.orig Thu Feb 28 09:26:44 2002 +++ ext/standard/file.c Tue May 7 13:57:19 2002 @@ -1453,7 +1453,7 @@ PHP_FUNCTION(mkdir) { int dir_len, ret; - mode_t mode = 0777; + long mode = 0777; char *dir; if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "s|l", &dir, &dir_len, &mode) == FAILURE) { @@ -1468,7 +1468,7 @@ RETURN_FALSE; } - ret = VCWD_MKDIR(dir, mode); + ret = VCWD_MKDIR(dir, (mode_t)mode); if (ret < 0) { php_error(E_WARNING, "mkdir() failed (%s)", strerror(errno)); RETURN_FALSE; --- patch-ext_mkdir ends here --- >Release-Note: >Audit-Trail: >Unformatted: To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020507121607.ADE18EC>