mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-13 14:50:17 +00:00
Expect return alue to be ERANGE if buffer is too small.
This commit is contained in:
parent
9105ced87a
commit
0030f0f780
@ -114,12 +114,13 @@ FUNCTION_NAME (ADD_PARAMS)
|
||||
}
|
||||
|
||||
while (buffer != NULL
|
||||
&& INTERNAL (REENTRANT_NAME) (ADD_VARIABLES, &resbuf, buffer,
|
||||
buffer_size, &result H_ERRNO_VAR) != 0
|
||||
&& (INTERNAL (REENTRANT_NAME) (ADD_VARIABLES, &resbuf, buffer,
|
||||
buffer_size, &result H_ERRNO_VAR)
|
||||
== ERANGE)
|
||||
#ifdef NEED_H_ERRNO
|
||||
&& h_errno_tmp == NETDB_INTERNAL
|
||||
#endif
|
||||
&& errno == ERANGE)
|
||||
)
|
||||
{
|
||||
char *new_buf;
|
||||
buffer_size += BUFLEN;
|
||||
|
@ -85,11 +85,11 @@ GETFUNC_NAME (void)
|
||||
|
||||
while (buffer != NULL
|
||||
&& INTERNAL (REENTRANT_GETNAME) (&resbuf, buffer, buffer_size, &result
|
||||
H_ERRNO_VAR) != 0
|
||||
H_ERRNO_VAR) == ERANGE
|
||||
#ifdef NEED_H_ERRNO
|
||||
&& h_errno == NETDB_INTERNAL
|
||||
#endif
|
||||
&& errno == ERANGE)
|
||||
)
|
||||
{
|
||||
char *new_buf;
|
||||
buffer_size += BUFLEN;
|
||||
|
Loading…
Reference in New Issue
Block a user