From 736ab899c4ab56dea0d329583f73e3f2b54a1dc1 Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Thu, 14 Feb 2002 01:02:42 +0000 Subject: 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 . --- locale/programs/ld-collate.c | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'locale/programs') 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) { -- cgit 1.4.1