summary refs log tree commit diff
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2002-01-11 06:47:31 +0000
committerUlrich Drepper <drepper@redhat.com>2002-01-11 06:47:31 +0000
commite57372d1e2b6fedc490e6670874077e9168c8807 (patch)
tree971387f5336be8265413550ad63280f2a352dffc
parentd77a71c5fe3c716d708be5f283b4845040dcf26e (diff)
downloadglibc-e57372d1e2b6fedc490e6670874077e9168c8807.tar.gz
glibc-e57372d1e2b6fedc490e6670874077e9168c8807.tar.xz
glibc-e57372d1e2b6fedc490e6670874077e9168c8807.zip
Update.
2002-01-10  Ulrich Drepper  <drepper@redhat.com>

	* locale/programs/charmap.c (new_width): Check whether byte
	sequences for both ends of range have the same length.
-rw-r--r--ChangeLog5
-rw-r--r--locale/programs/charmap.c12
2 files changed, 16 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index 4f94e49319..35db6ba8c3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2002-01-10  Ulrich Drepper  <drepper@redhat.com>
+
+	* locale/programs/charmap.c (new_width): Check whether byte
+	sequences for both ends of range have the same length.
+
 2002-01-09  Jakub Jelinek  <jakub@redhat.com>
 
 	* elf/elf.h (SHN_UNDEF): Remove duplicate definition.
diff --git a/locale/programs/charmap.c b/locale/programs/charmap.c
index 7840242d8d..815a28d419 100644
--- a/locale/programs/charmap.c
+++ b/locale/programs/charmap.c
@@ -1,4 +1,4 @@
-/* Copyright (C) 1996,1998,1999,2000,2001 Free Software Foundation, Inc.
+/* Copyright (C) 1996,1998,1999,2000,2001,2002 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@gnu.org>, 1996.
 
@@ -868,6 +868,16 @@ new_width (struct linereader *cmfile, struct charmap_t *result,
 	  lr_error (cmfile, _("unknown character `%s'"), to);
 	  return;
 	}
+
+      /* Make sure the number of bytes for the end points of the range
+	 is correct.  */
+      if (from_val->nbytes != to_val->nbytes)
+	{
+	  lr_error (cmfile, _("\
+number of bytes for byte sequence of beginning and end of range not the same: %d vs %d"),
+		    from_val->nbytes, to_val->nbytes);
+	  return;
+	}
     }
 
   if (result->nwidth_rules >= result->nwidth_rules_max)