about summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>1999-09-27 07:02:38 +0000
committerUlrich Drepper <drepper@redhat.com>1999-09-27 07:02:38 +0000
commit549b3c3a857c21dcf8ac2b1a52cdea28803e2e09 (patch)
treee4d153342928efc2d41f6f423c9193cc05b46df4
parent756409c4cffe5a4ad6ef965c7cf14eecc3bf5760 (diff)
downloadglibc-549b3c3a857c21dcf8ac2b1a52cdea28803e2e09.tar.gz
glibc-549b3c3a857c21dcf8ac2b1a52cdea28803e2e09.tar.xz
glibc-549b3c3a857c21dcf8ac2b1a52cdea28803e2e09.zip
Update.
1999-09-26  Ulrich Drepper  <drepper@cygnus.com>

	* locale/programs/ld-ctype.c (charclass_symbolic_ellipsis): Fix
	error message printing.  Correctly test whether all characters of
	current token are used.
	(ctype_read): NUL terminate last_str.
-rw-r--r--ChangeLog7
-rw-r--r--locale/programs/ld-ctype.c9
-rw-r--r--nscd/connections.c2
3 files changed, 14 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog
index 23d02bccab..50d5060c3a 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+1999-09-26  Ulrich Drepper  <drepper@cygnus.com>
+
+	* locale/programs/ld-ctype.c (charclass_symbolic_ellipsis): Fix
+	error message printing.  Correctly test whether all characters of
+	current token are used.
+	(ctype_read): NUL terminate last_str.
+
 1999-09-26  Thorsten Kukuk  <kukuk@suse.de>
 
 	* nscd/connections.c: Invalidate caches on request.
diff --git a/locale/programs/ld-ctype.c b/locale/programs/ld-ctype.c
index d587288db7..c274c0ca48 100644
--- a/locale/programs/ld-ctype.c
+++ b/locale/programs/ld-ctype.c
@@ -1148,8 +1148,8 @@ charclass_symbolic_ellipsis (struct linereader *ldfile,
     {
     invalid_range:
       lr_error (ldfile,
-		_("`%s' and `%s' are no valid names for symbolic range"),
-		last_str, nowstr);
+		_("`%s' and `%.*s' are no valid names for symbolic range"),
+		last_str, now->val.str.lenmb, nowstr);
       return;
     }
 
@@ -1166,7 +1166,8 @@ charclass_symbolic_ellipsis (struct linereader *ldfile,
     goto invalid_range;
 
   to = strtoul (nowstr + (cp - last_str), &endp, base);
-  if ((to == UINT_MAX && errno == ERANGE) || *endp != '\0' || from >= to)
+  if ((to == UINT_MAX && errno == ERANGE)
+      || (endp - nowstr) != now->val.str.lenmb || from >= to)
     goto invalid_range;
 
   /* OK, we have a range FROM - TO.  Now we can create the symbolic names.  */
@@ -1778,6 +1779,8 @@ unknown character class `%s' in category `LC_CTYPE'"),
 			       &ctype->class_collection_act, wch) |= class_bit;
 
 		  last_token = now->tok;
+		  /* Terminate the string.  */
+		  now->val.str.startmb[now->val.str.lenmb] = '\0';
 		  last_str = now->val.str.startmb;
 		  last_seq = seq;
 		  last_wch = wch;
diff --git a/nscd/connections.c b/nscd/connections.c
index cbacf9650a..10f49cd0c6 100644
--- a/nscd/connections.c
+++ b/nscd/connections.c
@@ -195,7 +195,7 @@ close_sockets (void)
 }
 
 static void
-invalidate_cache (void *key)
+invalidate_cache (char *key)
 {
   dbtype number;