This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [PATCH] Avoid res_nsend fd leaks


On Thu, Jan 04, 2001 at 08:00:12AM +0100, Andreas Jaeger wrote:
> Your patch enlarges struct __rest_state.  Can we easily do that
> without breaking user programs?

It does not: on all but I think m68k nsinit fits into the pad between
nscount6 and nsinit (nsaddrs has to be at least 4-8 bytes aligned, while
nscount6+2 is offset 22 within the structure), on m68k, since it is 32bit,
it should be covered by the 52 bytes pad.

>  > --- libc/resolv/resolv.h.jj	Thu Aug 10 09:39:05 2000
>  > +++ libc/resolv/resolv.h	Wed Jan  3 23:32:23 2001
>  > @@ -154,6 +154,7 @@ struct __res_state {
>  >  			u_int16_t		nstimes[MAXNS];	/* ms. */
>  >  			int			nssocks[MAXNS];
>  >  			u_int16_t		nscount6;
>  > +			u_int16_t		nsinit;
>  >  			struct sockaddr_in6	*nsaddrs[MAXNS];
>  >  		} _ext;
>  >  	} _u;

	Jakub

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]