From patchwork Fri Dec 21 15:29:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Florian Weimer X-Patchwork-Id: 1017586 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=sourceware.org (client-ip=209.132.180.131; helo=sourceware.org; envelope-from=libc-alpha-return-98702-incoming=patchwork.ozlabs.org@sourceware.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=redhat.com Authentication-Results: ozlabs.org; dkim=pass (1024-bit key; secure) header.d=sourceware.org header.i=@sourceware.org header.b="fW+mooW6"; dkim-atps=neutral Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 43Lsxf5DFFz9sBh for ; Sat, 22 Dec 2018 02:29:42 +1100 (AEDT) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:mime-version :content-type; q=dns; s=default; b=iSm53rtnggSIQE7p3td8lT83deUv7 RL5PEu6LksEoOXvTlfuuC23qhp2nfpqiTMec6CSNaXiHBXBS/RLk9tE7DjreNnRi HRArewSW9f0gUQGYqcuhou2J6D4COxhCwzdW0mFYEiQRKDyiLIhheC4LMK8dj6Px rw0qoy02F5cpd4= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:from:to:subject:date:message-id:mime-version :content-type; s=default; bh=tt9Cnz2IR5sTLpF5ONl8HC8O7a0=; b=fW+ mooW6L1/umeIHOUuD/h0Goe9lP3V78oez6kv8Ik4PcvCVFglI6fFRG13g6n6c0e1 UfEz8G2nrHk5VH5sdpnlDkcfiO1lI0T//g2UCfxXelpQpFuwoO3H4CbR/vlLuIy+ Y4gHFse77RTGgXnZHaafoFQ93nLt1aghKDsSYtUM= Received: (qmail 120936 invoked by alias); 21 Dec 2018 15:29:37 -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 120919 invoked by uid 89); 21 Dec 2018 15:29:36 -0000 Authentication-Results: sourceware.org; auth=none 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 autolearn=ham version=3.3.2 spammy= X-HELO: mx1.redhat.com From: Florian Weimer To: libc-alpha@sourceware.org Subject: [PATCH] intl: Do not return NULL on asprintf failure in gettext [BZ #24018] Date: Fri, 21 Dec 2018 16:29:33 +0100 Message-ID: <875zvmq4o2.fsf@oldenburg2.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.1 (gnu/linux) MIME-Version: 1.0 Fixes commit 9695dd0c9309712ed8e9c17a7040fe7af347f2dc ("DCIGETTEXT: Use getcwd, asprintf to construct absolute pathname"). 2018-12-21 Florian Weimer [BZ #24018] * intl/dcigettext.c (DCIGETTEXT): Do not return NULL on asprintf failure. diff --git a/intl/dcigettext.c b/intl/dcigettext.c index 2a50369948..25f47c5bd3 100644 --- a/intl/dcigettext.c +++ b/intl/dcigettext.c @@ -631,7 +631,7 @@ DCIGETTEXT (const char *domainname, const char *msgid1, const char *msgid2, int ret = __asprintf (&xdirname, "%s/%s", cwd, dirname); free (cwd); if (ret < 0) - return NULL; + goto return_untranslated; dirname = xdirname; } #ifndef IN_LIBGLOCALE