summary refs log tree commit diff
path: root/locale/programs/ld-collate.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-02-14 01:02:42 +0000
committerUlrich Drepper <drepper@redhat.com>2002-02-14 01:02:42 +0000
commit736ab899c4ab56dea0d329583f73e3f2b54a1dc1 (patch)
treea8da2935bd064d68d6cf060afb9dd7ef0debeaa9 /locale/programs/ld-collate.c
parentbf1097cb3b48059b37dd0fb140f329a26a54af0d (diff)
downloadglibc-736ab899c4ab56dea0d329583f73e3f2b54a1dc1.tar.gz
glibc-736ab899c4ab56dea0d329583f73e3f2b54a1dc1.tar.xz
glibc-736ab899c4ab56dea0d329583f73e3f2b54a1dc1.zip
Update.
	* po/da.po: Update from translation team.

	* locale/categories.def: Fix typo [PR libc/2948].
	* po/Makefile (BROKEN_LINGUAS): Works with current gettext
	[PR libc/2949].
	* locale/iso-4217.def: Update from official version [PR libc/2950].
	* glibcbug.in: Honor TMPDIR [PR libc/2951].
	* locale/programs/ld-collate.c (collate_finish): Bail out with a
	message if input is too confusion instead of using assert.
	(collate_read): Don't crash on unknown symbol [PR libc/2952].
	Patches by Alastair McKinstry <alastair@pdd.3com.com>.
Diffstat (limited to 'locale/programs/ld-collate.c')
-rw-r--r--locale/programs/ld-collate.c19
1 files changed, 17 insertions, 2 deletions
diff --git a/locale/programs/ld-collate.c b/locale/programs/ld-collate.c
index b9ea186d31..191194799d 100644
--- a/locale/programs/ld-collate.c
+++ b/locale/programs/ld-collate.c
@@ -1809,7 +1809,15 @@ symbol `%s' has the same encoding as"), (*eptr)->name);
   sect = collate->sections;
   while (sect != NULL && sect->rules == NULL)
     sect = sect->next;
-  assert (sect != NULL);
+
+  /* Bail out if we have no sections because of earlier errors.  */
+  if (sect == NULL)
+    {
+      WITH_CUR_LOCALE (error (EXIT_FAILURE, 0,
+			      _("too many errors; giving up")));
+      return;
+    }
+
   ruleidx = 0;
   do
     {
@@ -3489,11 +3497,18 @@ error while adding equivalent collating symbol"));
 	      symstr = ucs4buf;
 	      symlen = 9;
 	    }
-	  else
+	  else if (arg != NULL)
 	    {
 	      symstr = arg->val.str.startmb;
 	      symlen = arg->val.str.lenmb;
 	    }
+	  else
+	    {
+	      lr_error (ldfile, _("%s: bad symbol <%.*s>"), "LC_COLLATE",
+			ldfile->token.val.str.lenmb,
+			ldfile->token.val.str.startmb);
+	      break;
+	    }
 
 	  if (state == 0)
 	    {