mirror of
https://sourceware.org/git/glibc.git
synced 2025-08-29 06:42:03 +03:00
(parse_tilde): Fix use of extend_alloca.
This commit is contained in:
@@ -329,7 +329,7 @@ parse_tilde (char **word, size_t *word_length, size_t *max_length,
|
|||||||
|
|
||||||
while ((result = __getpwuid_r (uid, &pwd, buffer, buflen, &tpwd)) != 0
|
while ((result = __getpwuid_r (uid, &pwd, buffer, buflen, &tpwd)) != 0
|
||||||
&& errno == ERANGE)
|
&& errno == ERANGE)
|
||||||
extend_alloca (buffer, buflen, buflen + 1000);
|
buffer = extend_alloca (buffer, buflen, buflen + 1000);
|
||||||
|
|
||||||
if (result == 0 && tpwd != NULL && pwd.pw_dir != NULL)
|
if (result == 0 && tpwd != NULL && pwd.pw_dir != NULL)
|
||||||
{
|
{
|
||||||
@@ -356,7 +356,7 @@ parse_tilde (char **word, size_t *word_length, size_t *max_length,
|
|||||||
|
|
||||||
while ((result = __getpwnam_r (user, &pwd, buffer, buflen, &tpwd)) != 0
|
while ((result = __getpwnam_r (user, &pwd, buffer, buflen, &tpwd)) != 0
|
||||||
&& errno == ERANGE)
|
&& errno == ERANGE)
|
||||||
extend_alloca (buffer, buflen, buflen + 1000);
|
buffer = extend_alloca (buffer, buflen, buflen + 1000);
|
||||||
|
|
||||||
if (result == 0 && tpwd != NULL && pwd.pw_dir)
|
if (result == 0 && tpwd != NULL && pwd.pw_dir)
|
||||||
*word = w_addstr (*word, word_length, max_length, pwd.pw_dir);
|
*word = w_addstr (*word, word_length, max_length, pwd.pw_dir);
|
||||||
|
Reference in New Issue
Block a user