about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--posix/confstr.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/posix/confstr.c b/posix/confstr.c
index bc3c8b89e3..212ec72311 100644
--- a/posix/confstr.c
+++ b/posix/confstr.c
@@ -143,12 +143,13 @@ confstr (name, buf, len)
 
     case _CS_GNU_LIBC_VERSION:
       string = "glibc " VERSION;
-      string_len = strlen (string);
+      string_len = sizeof ("glibc " VERSION);
+      break;
 
     case _CS_GNU_LIBPTHREAD_VERSION:
 #ifdef LIBPTHREAD_VERSION
       string = LIBPTHREAD_VERSION;
-      string_len = strlen (string);
+      string_len = sizeof LIBPTHREAD_VERSION;
       break;
 #else
       /* No thread library.  */