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


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

Re: nss buffers?


smurf@noris.de (Matthias Urlichs) writes:

> I just noticed that a getspnam() call will trash the buffer used by a
> previous getpwnam(). This caused wu-ftpd to break.
> 
> Fixing wu-ftpd is simple, but what do the standards say? Is that buffer
> allowed to be shared?

There shouldn't be any problem since nothing from the buffer is read.
Of course you can't use the same buffer in both functions at the same
time.

If there are still problems please investigate them.  I really cannot
think about anything which could be wrong but who knows?  (BTW:
shouldn't it be getspname_r and getpwnam_r?)

-- 
---------------.      drepper at gnu.org  ,-.   1325 Chesapeake Terrace
Ulrich Drepper  \    ,-------------------'   \  Sunnyvale, CA 94089 USA
Cygnus Solutions `--' drepper at cygnus.com   `------------------------


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