aboutsummaryrefslogtreecommitdiffstats
path: root/main/gettext
diff options
context:
space:
mode:
authorNatanael Copa <ncopa@alpinelinux.org>2018-08-13 11:14:52 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2018-08-13 11:21:46 +0000
commitaa6d1b69a612262a48f656c477212ee5e586c44c (patch)
tree7d1004612609fafbbb453e4c5245e355753b7838 /main/gettext
parent19741d784761bf6720ad203b56858b18a05e659d (diff)
downloadaports-aa6d1b69a612262a48f656c477212ee5e586c44c.tar.bz2
aports-aa6d1b69a612262a48f656c477212ee5e586c44c.tar.xz
main/gettext: fix crash in xgettext --its
Diffstat (limited to 'main/gettext')
-rw-r--r--main/gettext/APKBUILD6
-rw-r--r--main/gettext/fix-crash-of-xgettext-with--its-option.patch43
2 files changed, 47 insertions, 2 deletions
diff --git a/main/gettext/APKBUILD b/main/gettext/APKBUILD
index 6c092dd879..4d998ea6b9 100644
--- a/main/gettext/APKBUILD
+++ b/main/gettext/APKBUILD
@@ -2,7 +2,7 @@
# Maintainer: Carlo Landmeter <clandmeter@gmail.com>
pkgname=gettext
pkgver=0.19.8.1
-pkgrel=3
+pkgrel=4
pkgdesc="GNU locale utilities"
url="https://www.gnu.org/software/gettext/gettext.html"
arch="all"
@@ -19,6 +19,7 @@ source="http://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.xz
skip-tests-musl.patch
skip-tests-alpine.patch
unbundle-libunistring.patch
+ fix-crash-of-xgettext-with--its-option.patch
"
subpackages="$pkgname-dbg $pkgname-doc $pkgname-static $pkgname-dev $pkgname-lang libintl $pkgname-asprintf $pkgname-libs"
@@ -80,4 +81,5 @@ f517a351864bb194117e7147015db9a9b0ffbb1feb22ecf39bc1c99ad904420467e267a893c3b1a7
2765f8d9d72d85ad0adb87ee0edd83d3aec59995ef21a3c8bbd1ac20a3680058a2122bd3f6c37be3f50cb5ea00c19b3ad569a47ceedc8ae2cb4a6e8d4e30976d localename-fix.patch
8fced6ec5c1f54686545aa91759f8501a0ccfa4bb66a781d282e65f7309c70ab74bf753f4969374facb135b7b9341e26d8a3e27679ea09cb1543b82dfb8a16dd skip-tests-musl.patch
4171b52abb9a34cc30ad9d737a6d4fc94d7365781f13522eef9111e2fc34f08f3206508471b2c2ab70ae95ecb110bc569535ca949bded3e8896c83e9d752d06e skip-tests-alpine.patch
-86dcba9b53048b01c8912bdcfc7e9372a37f196352ef366d5192af204cb1bad95c31803991e0a408ab16b0c7094846df5ef95243bb09894e3dc9b3c4e5daaa43 unbundle-libunistring.patch"
+86dcba9b53048b01c8912bdcfc7e9372a37f196352ef366d5192af204cb1bad95c31803991e0a408ab16b0c7094846df5ef95243bb09894e3dc9b3c4e5daaa43 unbundle-libunistring.patch
+3ad909028d887429248b79ef3f2289d8934a5dd9337e51abbf05cece2fed3e2b12d228a587ebcbd0e775380b86825a6f796d2d0392b24384f5f8d298f78965ea fix-crash-of-xgettext-with--its-option.patch"
diff --git a/main/gettext/fix-crash-of-xgettext-with--its-option.patch b/main/gettext/fix-crash-of-xgettext-with--its-option.patch
new file mode 100644
index 0000000000..49fde4f4c7
--- /dev/null
+++ b/main/gettext/fix-crash-of-xgettext-with--its-option.patch
@@ -0,0 +1,43 @@
+From a0cab23332a254e3500cac2a3a984472d02180e5 Mon Sep 17 00:00:00 2001
+From: Bruno Haible <bruno@clisp.org>
+Date: Fri, 9 Dec 2016 21:04:31 +0100
+Subject: Fix crash of xgettext with --its option.
+
+* gettext-tools/src/xgettext.c (main): Free contents of its_dirs only when it
+was initialized. Fixes bug introduced on 2016-05-16.
+---
+ gettext-tools/src/xgettext.c | 11 +++++++----
+ 1 file changed, 7 insertions(+), 4 deletions(-)
+
+diff --git a/gettext-tools/src/xgettext.c b/gettext-tools/src/xgettext.c
+index f848d76..a80ee51 100644
+--- a/gettext-tools/src/xgettext.c
++++ b/gettext-tools/src/xgettext.c
+@@ -330,7 +330,7 @@ main (int argc, char *argv[])
+ bool sort_by_msgid = false;
+ bool sort_by_filepos = false;
+ char **dirs;
+- char **its_dirs;
++ char **its_dirs = NULL;
+ char *explicit_its_filename = NULL;
+ const char *file_name;
+ const char *files_from = NULL;
+@@ -1016,9 +1016,12 @@ warning: file '%s' extension '%s' is unknown; will try C"), filename, extension)
+ if (its_locating_rules)
+ locating_rule_list_free (its_locating_rules);
+
+- for (i = 0; its_dirs[i] != NULL; i++)
+- free (its_dirs[i]);
+- free (its_dirs);
++ if (its_dirs != NULL)
++ {
++ for (i = 0; its_dirs[i] != NULL; i++)
++ free (its_dirs[i]);
++ free (its_dirs);
++ }
+
+ exit (EXIT_SUCCESS);
+ }
+--
+cgit v1.0-41-gc330
+