From: Jakub Jelinek <jakub@redhat.com>
To: Ulrich Drepper <drepper@redhat.com>, Roland McGrath <roland@redhat.com>
Cc: Glibc hackers <libc-hacker@sources.redhat.com>
Subject: [PATCH] Fix wcsmbs with invalid charsets
Date: Thu, 05 Sep 2002 13:20:00 -0000 [thread overview]
Message-ID: <20020905222050.V1013@sunsite.ms.mff.cuni.cz> (raw)
Hi!
When either malloc fails or there is no gconv module for the given charset,
we end up with endless loop.
This got broken when I was changing the patch to not test locale
name against _nl_C_name (in that case was failed: in that if and the rest
of code in else branch and so both would unlock/exit the function).
Sorry.
2002-09-05 Jakub Jelinek <jakub@redhat.com>
* wcsmbs/wcsmbsload.c (__wcsmbs_load_conv): Unlock and return in
case of failure.
--- libc/wcsmbs/wcsmbsload.c.jj 2002-09-03 15:30:40.000000000 +0200
+++ libc/wcsmbs/wcsmbsload.c 2002-09-05 22:12:51.000000000 +0200
@@ -169,6 +169,8 @@ __wcsmbs_load_conv (struct locale_data *
{
failed:
new_category->private.ctype = &__wcsmbs_gconv_fcts_c;
+ __libc_lock_unlock (__libc_setlocale_lock);
+ return;
}
/* Get name of charset of the locale. */
Jakub
next reply other threads:[~2002-09-05 20:20 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-09-05 13:20 Jakub Jelinek [this message]
2002-09-05 13:31 ` [PATCH] Fix wcsmbs with invalid charsets (take 2) Jakub Jelinek
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20020905222050.V1013@sunsite.ms.mff.cuni.cz \
--to=jakub@redhat.com \
--cc=drepper@redhat.com \
--cc=libc-hacker@sources.redhat.com \
--cc=roland@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).