From 8c1aafc1f34d090a5b41dc527c33e8687f6a1287 Mon Sep 17 00:00:00 2001 From: Florian Weimer Date: Fri, 21 Dec 2018 16:08:55 +0100 Subject: intl: Do not return NULL on asprintf failure in gettext [BZ #24018] Fixes commit 9695dd0c9309712ed8e9c17a7040fe7af347f2dc ("DCIGETTEXT: Use getcwd, asprintf to construct absolute pathname"). --- ChangeLog | 6 ++++++ intl/dcigettext.c | 2 +- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 846de9c..8c08481 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2018-12-21 Florian Weimer + + [BZ #24018] + * intl/dcigettext.c (DCIGETTEXT): Do not return NULL on asprintf + failure. + 2019-01-02 Florian Weimer * nptl/tst-audit-threads.c: Switch to . diff --git a/intl/dcigettext.c b/intl/dcigettext.c index f22b372..4df93e2 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 -- cgit v1.1