From patchwork Mon Jun 19 16:16:57 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 21094 Received: (qmail 57511 invoked by alias); 19 Jun 2017 16:17:01 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 57017 invoked by uid 89); 19 Jun 2017 16:17:00 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-26.9 required=5.0 tests=BAYES_00, GIT_PATCH_0, GIT_PATCH_1, GIT_PATCH_2, GIT_PATCH_3, SPF_HELO_PASS, T_RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy=acquired X-HELO: mx1.redhat.com DMARC-Filter: OpenDMARC Filter v1.3.2 mx1.redhat.com EF05881F01 Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; dmarc=none (p=none dis=none) header.from=redhat.com Authentication-Results: ext-mx03.extmail.prod.ext.phx2.redhat.com; spf=pass smtp.mailfrom=fweimer@redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 mx1.redhat.com EF05881F01 Date: Mon, 19 Jun 2017 18:16:57 +0200 To: libc-alpha@sourceware.org Subject: [PATCH] DCIGETTEXT: Do not make copy of localename User-Agent: Heirloom mailx 12.5 7/5/10 MIME-Version: 1.0 Message-Id: <20170619161657.33121402AEC3C@oldenburg.str.redhat.com> From: fweimer@redhat.com (Florian Weimer) 2017-06-19 Florian Weimer * intl/dcigettext.c (DCIGETTEXT): Do not make copy of localename. It cannot change while __libc_setlocale_lock is acquired. diff --git a/intl/dcigettext.c b/intl/dcigettext.c index 3843b7c..d97746c 100644 --- a/intl/dcigettext.c +++ b/intl/dcigettext.c @@ -551,7 +551,7 @@ DCIGETTEXT (const char *domainname, const char *msgid1, const char *msgid2, #ifdef HAVE_PER_THREAD_LOCALE # ifndef IN_LIBGLOCALE # ifdef _LIBC - localename = strdupa (__current_locale_name (category)); + localename = __current_locale_name (category); # else categoryname = category_to_name (category); # define CATEGORYNAME_INITIALIZED