This is the mail archive of the libc-alpha@sourceware.cygnus.com mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

localedef dumps core at charmap.c


When filename == NULL, it dumps core.  Here's fix.

2000-07-04  NIIBE Yutaka  <gniibe@chroot.org>

	* locale/programs/charmap.c (charmap_read): Prepend
	the condition filename == NULL.

Index: locale/programs/charmap.c
===================================================================
RCS file: /cvs/glibc/libc/locale/programs/charmap.c,v
retrieving revision 1.26
diff -u -r1.26 charmap.c
--- charmap.c	2000/06/20 22:28:18	1.26
+++ charmap.c	2000/07/03 23:54:14
@@ -159,7 +159,7 @@
 				== 1)
 			    || fscanf (fp, "%% alias %as", &name) == 1)
 			  {
-			    if (strcasecmp (name, filename) == 0)
+			    if (filename != NULL && strcasecmp (name, filename) == 0)
 			      break;
 
 			    free (name);
-- 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]