This is the mail archive of the libc-hacker@sourceware.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: getXXent.c endless loop


Thorsten Kukuk <kukuk@weber-eb.uni-paderborn.de> writes:

> In nss/getXXent.c, there is a bug: If we need once more memory,  errno is set
> to ERANGE., but never set back.  If we have read the last entry, errno is
> ERANGE, and we will allocate all available memory.

Which backend?  The clean solution for this is to set errno in the
backends whenever they return errors.  I.e., if the error is caused by
something different than a buffer overflow errno should be set to a
value != ERANGE.

-- 
---------------.      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]