You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by ta...@apache.org on 2009/06/01 16:53:02 UTC
svn commit: r780669 - in /httpd/mod_fcgid/trunk/mod_fcgid:
arch/unix/fcgid_proc_unix.c fcgid_bridge.c fcgid_conf.c
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));