bug in transliteration module loader

Bruno Haible haible@ilog.fr
Mon Sep 4 05:58:00 GMT 2000


The transliteration module loader will always add a .so suffix even if
it is already present, because of an off-by-one error.
(trans->name[name_len - 1] is always = '\0'.)


2000-09-03  Bruno Haible  <haible@clisp.cons.org>

	* iconv/gconv_trans.c (__gconv_translit_find): Don't set need_so to
	true if trans->name already ends in ".so".

*** glibc-20000831/iconv/gconv_trans.c.bak	Mon Aug 28 13:34:25 2000
--- glibc-20000831/iconv/gconv_trans.c	Sat Sep  2 16:52:59 2000
***************
*** 345,351 ****
  	__gconv_get_path ();
  
        /* See whether we have to append .so.  */
!       if (name_len <= 3 || memcmp (&trans->name[name_len - 3], ".so", 3) != 0)
  	need_so = 1;
  
        /* Create a new entry.  */
--- 346,352 ----
  	__gconv_get_path ();
  
        /* See whether we have to append .so.  */
!       if (name_len <= 4 || memcmp (&trans->name[name_len - 4], ".so", 3) != 0)
  	need_so = 1;
  
        /* Create a new entry.  */


More information about the Libc-alpha mailing list