[PATCH] Avoid res_nsend fd leaks
Jakub Jelinek
jakub@redhat.com
Wed Jan 3 23:36:00 GMT 2001
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
More information about the Libc-hacker
mailing list