musl - musl - an implementation of the standard library for Linux-based systems

index : musl
musl - an implementation of the standard library for Linux-based systems
summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/unistd/getlogin_r.c 2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/unistd/getlogin_r.c b/src/unistd/getlogin_r.c
index f04f71e5..37ce0d43 100644
--- a/src/unistd/getlogin_r.c
+++ b/src/unistd/getlogin_r.c
@@ -7,7 +7,7 @@ int getlogin_r(char *name, size_t size)
{
char *logname = getlogin();
if (!logname) return ENXIO; /* or...? */
- if (strlen(name) >= size) return ERANGE;
+ if (strlen(logname) >= size) return ERANGE;
strcpy(name, logname);
return 0;
}
generated by cgit v1.2.1 (git 2.18.0) at 2025年10月07日 21:00:47 +0000

AltStyle によって変換されたページ (->オリジナル) /