Discussion:
getnameinfo() / getservent_r() windows
(too old to reply)
Sean Boudreau
2009-08-11 17:26:52 UTC
Permalink
There's a section in getnameinfo() where the results
of a getservbyport_r() are referenced after a
endservent_r() which invalidates it.

There's also a couple of sections in the getservent_r()
handling where a buffer that may not have been malloc()'d
is free()'d

Any concerns before I commit?

Regards,

-seanb
Christos Zoulas
2009-08-11 20:19:22 UTC
Permalink
-=-=-=-=-=-
There's a section in getnameinfo() where the results
of a getservbyport_r() are referenced after a
endservent_r() which invalidates it.
There's also a couple of sections in the getservent_r()
handling where a buffer that may not have been malloc()'d
is free()'d
Any concerns before I commit?
go for it.

christos


--
Posted automagically by a mail2news gateway at muc.de e.V.
Please direct questions, flames, donations, etc. to news-***@muc.de
Sean Boudreau
2009-08-12 20:32:21 UTC
Permalink
Post by Christos Zoulas
-=-=-=-=-=-
There's a section in getnameinfo() where the results
of a getservbyport_r() are referenced after a
endservent_r() which invalidates it.
There's also a couple of sections in the getservent_r()
handling where a buffer that may not have been malloc()'d
is free()'d
Any concerns before I commit?
go for it.
Done, although the non malloc()'d part was bogus (confusing
fgetln() and fparseln()).

I checked getaddrinfo() for the same thing. It used to
be there but there's been a lot of reorg to leverage
_SV_STAYOPEN but I can't see where that's actually being
set. Was the following the intention?

-seanb

Loading...