errno may be non-zero when entering function. Function then completes successfully but reports error.
Signed-off-by: Baruch Burstein <[email protected]> --- libpwdgrp/pwd_grp.c | 1 + 1 file changed, 1 insertion(+) diff --git a/libpwdgrp/pwd_grp.c b/libpwdgrp/pwd_grp.c index 10debbcdb..9caf4d70a 100644 --- a/libpwdgrp/pwd_grp.c +++ b/libpwdgrp/pwd_grp.c @@ -331,6 +331,7 @@ static int massage_data_for_r_func(struct passdb *db, { void *result_buf = *result; *result = NULL; + errno = 0; if (buf) { if (S.string_size > buflen) { errno = ERANGE; -- 2.25.1 _______________________________________________ busybox mailing list [email protected] https://lists.busybox.net/mailman/listinfo/busybox
