]> 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>
Wed, 2 Jan 2019 15:46:12 +0000 (16:46 +0100)
committerFlorian Weimer <fweimer@redhat.com>
Wed, 2 Jan 2019 19:01:05 +0000 (20:01 +0100)
Fixes commit 9695dd0c9309712ed8e9c17a7040fe7af347f2dc ("DCIGETTEXT:
Use getcwd, asprintf to construct absolute pathname").

(cherry picked from commit 8c1aafc1f34d090a5b41dc527c33e8687f6a1287)

ChangeLog
NEWS
intl/dcigettext.c

index b5727c7585c55ee97387fae9f8315702b4359c94..4b18e27288697a02d593c4609f92164b3d52805f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2019-01-02  Florian Weimer  <fweimer@redhat.com>
+
+       [BZ #24018]
+       * intl/dcigettext.c (DCIGETTEXT): Do not return NULL on asprintf
+       failure.
+
 2018-12-31  Florian Weimer  <fw@deneb.enyo.de>
 
        [BZ #24027]
diff --git a/NEWS b/NEWS
index ef857b6e6cebf5afe12fd434075e53fe3446a401..49895f81bdc4f29e0ae7798f9f00d764d0bf1bb5 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -163,6 +163,7 @@ The following bugs are resolved with this release:
   [23579] libc: Errors misreported in preadv2
   [23709] Fix CPU string flags for Haswell-type CPUs
   [23927] Linux if_nametoindex() does not close descriptor (CVE-2018-19591)
+  [24018] gettext may return NULL
   [24027] malloc: Integer overflow in realloc
 \f
 Version 2.26
index f63b34b0f5d66a234835753995e60ced0af603a9..cfcdd304b4eca3c86bac0e54af192c07de4b8ac8 100644 (file)
@@ -635,7 +635,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