Return-Path: Delivered-To: apmail-httpd-cvs-archive@www.apache.org Received: (qmail 42431 invoked from network); 1 Jun 2009 14:53:12 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.3) by minotaur.apache.org with SMTP; 1 Jun 2009 14:53:12 -0000 Received: (qmail 345 invoked by uid 500); 1 Jun 2009 14:53:24 -0000 Delivered-To: apmail-httpd-cvs-archive@httpd.apache.org Received: (qmail 153 invoked by uid 500); 1 Jun 2009 14:53:24 -0000 Mailing-List: contact cvs-help@httpd.apache.org; run by ezmlm Precedence: bulk Reply-To: dev@httpd.apache.org list-help: list-unsubscribe: List-Post: List-Id: Delivered-To: mailing list cvs@httpd.apache.org Received: (qmail 144 invoked by uid 99); 1 Jun 2009 14:53:24 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Jun 2009 14:53:24 +0000 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.4] (HELO eris.apache.org) (140.211.11.4) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 01 Jun 2009 14:53:22 +0000 Received: by eris.apache.org (Postfix, from userid 65534) id 48BC52388868; Mon, 1 Jun 2009 14:53:02 +0000 (UTC) Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: svn commit: r780669 - in /httpd/mod_fcgid/trunk/mod_fcgid: arch/unix/fcgid_proc_unix.c fcgid_bridge.c fcgid_conf.c Date: Mon, 01 Jun 2009 14:53:02 -0000 To: cvs@httpd.apache.org From: takashi@apache.org X-Mailer: svnmailer-1.0.8 Message-Id: <20090601145302.48BC52388868@eris.apache.org> X-Virus-Checked: Checked by ClamAV on apache.org Author: takashi Date: Mon Jun 1 14:53:01 2009 New Revision: 780669 URL: http://svn.apache.org/viewvc?rev=780669&view=rev Log: Fix potential bugs about strict-aliasing rules. Modified: httpd/mod_fcgid/trunk/mod_fcgid/arch/unix/fcgid_proc_unix.c httpd/mod_fcgid/trunk/mod_fcgid/fcgid_bridge.c httpd/mod_fcgid/trunk/mod_fcgid/fcgid_conf.c Modified: httpd/mod_fcgid/trunk/mod_fcgid/arch/unix/fcgid_proc_unix.c URL: http://svn.apache.org/viewvc/httpd/mod_fcgid/trunk/mod_fcgid/arch/unix/fcgid_proc_unix.c?rev=780669&r1=780668&r2=780669&view=diff ============================================================================== --- httpd/mod_fcgid/trunk/mod_fcgid/arch/unix/fcgid_proc_unix.c (original) +++ httpd/mod_fcgid/trunk/mod_fcgid/arch/unix/fcgid_proc_unix.c Mon Jun 1 14:53:01 2009 @@ -363,7 +363,7 @@ apr_snprintf(key_name, _POSIX_PATH_MAX, "%lX%lX", procnode->inode, (unsigned long) procnode->deviceid); dummy = NULL; - apr_pool_userdata_get((void **) &dummy, key_name, g_inode_cginame_map); + apr_pool_userdata_get(&dummy, key_name, g_inode_cginame_map); if (!dummy) { /* Insert a new item if key not found */ char *put_key = apr_psprintf(g_inode_cginame_map, "%lX%lX", @@ -725,12 +725,13 @@ e = APR_BUCKET_NEXT(e)) { /* Read bucket */ apr_size_t len; - if ((rv = apr_bucket_read(e, (const char **) &vec[nvec].iov_base, - &len, + const char* base; + if ((rv = apr_bucket_read(e, &base, &len, APR_BLOCK_READ)) != APR_SUCCESS) return rv; vec[nvec].iov_len = len; + vec[nvec].iov_base = (char*) base; if (nvec == (FCGID_VEC_COUNT - 1)) { /* It's time to write now */ if ((rv = @@ -760,14 +761,16 @@ char signal_info[HUGE_STRING_LEN]; char key_name[_POSIX_PATH_MAX]; int signum = exitcode; + void* tmp; memset(signal_info, 0, HUGE_STRING_LEN); /* Get the file name infomation base on inode and deviceid */ apr_snprintf(key_name, _POSIX_PATH_MAX, "%lX%lX", procnode->inode, (unsigned long) procnode->deviceid); - apr_pool_userdata_get((void **) &cgipath, key_name, + apr_pool_userdata_get(&tmp, key_name, g_inode_cginame_map); + cgipath = tmp; /* Reasons to exit */ switch (procnode->diewhy) { Modified: httpd/mod_fcgid/trunk/mod_fcgid/fcgid_bridge.c URL: http://svn.apache.org/viewvc/httpd/mod_fcgid/trunk/mod_fcgid/fcgid_bridge.c?rev=780669&r1=780668&r2=780669&view=diff ============================================================================== --- httpd/mod_fcgid/trunk/mod_fcgid/fcgid_bridge.c (original) +++ httpd/mod_fcgid/trunk/mod_fcgid/fcgid_bridge.c Mon Jun 1 14:53:01 2009 @@ -573,9 +573,12 @@ apr_size_t wrote_len; static const char *fd_key = "fcgid_fd"; - if (fd == NULL) - apr_pool_userdata_get((void **) &fd, fd_key, + if (fd == NULL){ + void *tmp; + apr_pool_userdata_get(&tmp, fd_key, r->connection->pool); + fd = tmp; + } if (fd == NULL) { const char *tempdir = NULL; Modified: httpd/mod_fcgid/trunk/mod_fcgid/fcgid_conf.c URL: http://svn.apache.org/viewvc/httpd/mod_fcgid/trunk/mod_fcgid/fcgid_conf.c?rev=780669&r1=780668&r2=780669&view=diff ============================================================================== --- httpd/mod_fcgid/trunk/mod_fcgid/fcgid_conf.c (original) +++ httpd/mod_fcgid/trunk/mod_fcgid/fcgid_conf.c Mon Jun 1 14:53:01 2009 @@ -789,8 +789,13 @@ return "Invalid wrapper file extension"; /* Get wrapper_id base on wrapperpath */ - apr_pool_userdata_get((void *) &id_info, userdata_key, - cmd->server->process->pool); + { + void *id_info_vp; + apr_pool_userdata_get(&id_info_vp, userdata_key, + cmd->server->process->pool); + id_info = id_info_vp; + } + if (!id_info) { id_info = apr_pcalloc(cmd->server->process->pool, sizeof(*id_info));