about summary refs log tree commit diff
path: root/intl
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2019-01-02 16:46:12 +0100
committerFlorian Weimer <fweimer@redhat.com>2019-01-02 16:46:12 +0100
commitbee4baf6d7a1055f7e2819209e722c6effc9c1bf (patch)
treefaee1969199ad5d2eab10342f26efedcad767850 /intl
parent8f83d095fabf9e3e9e23023a010e50a21810d918 (diff)
downloadglibc-bee4baf6d7a1055f7e2819209e722c6effc9c1bf.tar.gz
glibc-bee4baf6d7a1055f7e2819209e722c6effc9c1bf.tar.xz
glibc-bee4baf6d7a1055f7e2819209e722c6effc9c1bf.zip
intl: Do not return NULL on asprintf failure in gettext [BZ #24018]
Fixes commit 9695dd0c9309712ed8e9c17a7040fe7af347f2dc ("DCIGETTEXT:
Use getcwd, asprintf to construct absolute pathname").

(cherry picked from commit 8c1aafc1f34d090a5b41dc527c33e8687f6a1287)
Diffstat (limited to 'intl')
-rw-r--r--intl/dcigettext.c2
1 files changed, 1 insertions, 1 deletions
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