summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog4
-rw-r--r--sysdeps/posix/cuserid.c2
2 files changed, 5 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 08db020060..13f07495d0 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,7 @@
+2010-03-25  Andreas Schwab  <schwab@redhat.com>
+
+	* sysdeps/posix/cuserid.c: Fix typo.
+
 2010-03-16  Chris Demetriou  <cgd@google.com>
 
 	* locale/programs/simple-hash.c: Include inttypes.h.
diff --git a/sysdeps/posix/cuserid.c b/sysdeps/posix/cuserid.c
index f30c20e3f8..a74ff84368 100644
--- a/sysdeps/posix/cuserid.c
+++ b/sysdeps/posix/cuserid.c
@@ -44,6 +44,6 @@ cuserid (s)
 
   if (s == NULL)
     s = name;
-  s[L_userid - 1] = '\0';
+  s[L_cuserid - 1] = '\0';
   return strncpy (s, pwptr->pw_name, L_cuserid - 1);
 }