httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Ryan Bloom <...@raleigh.ibm.com>
Subject Re: cvs commit: apache-2.0/src/lib/apr/network_io/unix sockets.c
Date Mon, 13 Sep 1999 11:02:25 GMT
> >    ap_status_t ap_getipaddr(struct socket_t *sock, char **addr)
> >    {
> >        char *temp = inet_ntoa(sock->addr->sin_addr);
> >   -    strcpy(*addr, temp);
> >   +    *addr=temp;
> >        return APR_SUCCESS;
> >    }
> 
> inet_ntoa() returns a pointer to a statically allocated buffer.
> Shouldn't we make a copy of it?

Yes.  That's why we were copying it originally.

Ryan

_______________________________________________________________________
Ryan Bloom		rbb@raleigh.ibm.com
4205 S Miami Blvd	
RTP, NC 27709		It's a beautiful sight to see good dancers 
			doing simple steps.  It's a painful sight to
			see beginners doing complicated patterns.	


Mime
View raw message