This is the mail archive of the libc-hacker@sourceware.org mailing list for the glibc project.
Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |
| Other format: | [Raw text] | |
Hi!
echo -e '\304\217' | elf/ld.so --library-path . iconv/iconv_prog -f utf-8 -t iso-8859-1//translit
segfaults, apparently due to missing demangling.
Fixed thusly:
2005-12-27 Jakub Jelinek <jakub@redhat.com>
* iconv/gconv_trans.c (__gconv_transliterate): Demangle step __fct
before calling it.
--- libc/iconv/gconv_trans.c.jj 2005-09-12 09:28:51.000000000 +0200
+++ libc/iconv/gconv_trans.c 2005-12-27 14:30:39.000000000 +0100
@@ -54,6 +54,12 @@ __gconv_transliterate (struct __gconv_st
winbuf = (const uint32_t *) *inbufp;
winbufend = (const uint32_t *) inbufend;
+ __gconv_fct fct = step->__fct;
+#ifdef PTR_DEMANGLE
+ if (step->__shlib_handle != NULL)
+ PTR_DEMANGLE (fct);
+#endif
+
/* If there is no transliteration information in the locale don't do
anything and return the error. */
size = _NL_CURRENT_WORD (LC_CTYPE, _NL_CTYPE_TRANSLIT_TAB_SIZE);
@@ -119,7 +125,7 @@ __gconv_transliterate (struct __gconv_st
/* Try this input text. */
toinptr = (const unsigned char *) &to_tbl[idx2];
outptr = *outbufstart;
- res = DL_CALL_FCT (step->__fct,
+ res = DL_CALL_FCT (fct,
(step, step_data, &toinptr,
(const unsigned char *) &to_tbl[idx2 + len],
&outptr, NULL, 0, 0));
@@ -204,7 +210,7 @@ __gconv_transliterate (struct __gconv_st
? __GCONV_EMPTY_INPUT : __GCONV_INCOMPLETE_INPUT);
outptr = *outbufstart;
- res = DL_CALL_FCT (step->__fct,
+ res = DL_CALL_FCT (fct,
(step, step_data, &toinptr,
(const unsigned char *) (default_missing + len),
&outptr, NULL, 0, 0));
Jakub
| Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
|---|---|---|
| Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |