httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Dean Gaudet <dgau...@arctic.org>
Subject Re: minor -Wall warning
Date Fri, 25 Apr 1997 00:58:23 GMT
On Thu, 24 Apr 1997, Jim Jagielski wrote:
> With latest CVS snapshot:
> 
>     gcc -c   -O2 -DAUX -D_POSIX_SOURCE -DSTATUS -Wall  util_script.c
>     util_script.c: In function `call_exec':
>     util_script.c:439: warning: `grpname' might be used uninitialized in
>      this function
> 
> A little change to 'char *grpname = NULL;' will fix that.

I think it's worse than that.  See enclosed patch.

Dean

Index: util_script.c
===================================================================
RCS file: /export/home/cvs/apache/src/util_script.c,v
retrieving revision 1.49
diff -c -3 -r1.49 util_script.c
*** util_script.c	1997/04/24 23:25:09	1.49
--- util_script.c	1997/04/25 00:57:51
***************
*** 572,579 ****
  		log_unixerr("getgrgid", NULL, "invalid groupid", r->server);
  		return;
  	    }
-             execuser = (char *) palloc (r->pool, sizeof(pw->pw_name));
              execuser = pw->pw_name;
          }
    
    	if (shellcmd)
--- 572,579 ----
  		log_unixerr("getgrgid", NULL, "invalid groupid", r->server);
  		return;
  	    }
              execuser = pw->pw_name;
+ 	    grpname = gr->gr_name;
          }
    
    	if (shellcmd)


Mime
View raw message