]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
intl: Do not return NULL on asprintf failure in gettext [BZ #24018]
authorFlorian Weimer <fweimer@redhat.com>
Fri, 21 Dec 2018 15:08:55 +0000 (16:08 +0100)
committerFlorian Weimer <fweimer@redhat.com>
Wed, 2 Jan 2019 15:26:58 +0000 (16:26 +0100)
Fixes commit 9695dd0c9309712ed8e9c17a7040fe7af347f2dc ("DCIGETTEXT:
Use getcwd, asprintf to construct absolute pathname").

ChangeLog
intl/dcigettext.c

index 846de9c0fd9fdeef46b3e62159b25f5096b89210..8c08481d1e10293b0918105dbf198c31ab956bb8 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2018-12-21  Florian Weimer  <fweimer@redhat.com>
+
+       [BZ #24018]
+       * intl/dcigettext.c (DCIGETTEXT): Do not return NULL on asprintf
+       failure.
+
 2019-01-02  Florian Weimer  <fweimer@redhat.com>
 
        * nptl/tst-audit-threads.c: Switch to <support/test-driver.c>.
index f22b37273f29bed552a31cc2f5c5464ad5390627..4df93e2a8e3cc2a7b941f12e5f1aa358f184cf43 100644 (file)
@@ -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