Skip to content
Snippets Groups Projects
Commit aa6d1b69 authored by Natanael Copa's avatar Natanael Copa
Browse files

main/gettext: fix crash in xgettext --its

parent 19741d78
No related branches found
No related tags found
No related merge requests found
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
# Maintainer: Carlo Landmeter <clandmeter@gmail.com> # Maintainer: Carlo Landmeter <clandmeter@gmail.com>
pkgname=gettext pkgname=gettext
pkgver=0.19.8.1 pkgver=0.19.8.1
pkgrel=3 pkgrel=4
pkgdesc="GNU locale utilities" pkgdesc="GNU locale utilities"
url="https://www.gnu.org/software/gettext/gettext.html" url="https://www.gnu.org/software/gettext/gettext.html"
arch="all" arch="all"
...@@ -19,6 +19,7 @@ source="http://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.xz ...@@ -19,6 +19,7 @@ source="http://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.xz
skip-tests-musl.patch skip-tests-musl.patch
skip-tests-alpine.patch skip-tests-alpine.patch
unbundle-libunistring.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" subpackages="$pkgname-dbg $pkgname-doc $pkgname-static $pkgname-dev $pkgname-lang libintl $pkgname-asprintf $pkgname-libs"
...@@ -80,4 +81,5 @@ f517a351864bb194117e7147015db9a9b0ffbb1feb22ecf39bc1c99ad904420467e267a893c3b1a7 ...@@ -80,4 +81,5 @@ f517a351864bb194117e7147015db9a9b0ffbb1feb22ecf39bc1c99ad904420467e267a893c3b1a7
2765f8d9d72d85ad0adb87ee0edd83d3aec59995ef21a3c8bbd1ac20a3680058a2122bd3f6c37be3f50cb5ea00c19b3ad569a47ceedc8ae2cb4a6e8d4e30976d localename-fix.patch 2765f8d9d72d85ad0adb87ee0edd83d3aec59995ef21a3c8bbd1ac20a3680058a2122bd3f6c37be3f50cb5ea00c19b3ad569a47ceedc8ae2cb4a6e8d4e30976d localename-fix.patch
8fced6ec5c1f54686545aa91759f8501a0ccfa4bb66a781d282e65f7309c70ab74bf753f4969374facb135b7b9341e26d8a3e27679ea09cb1543b82dfb8a16dd skip-tests-musl.patch 8fced6ec5c1f54686545aa91759f8501a0ccfa4bb66a781d282e65f7309c70ab74bf753f4969374facb135b7b9341e26d8a3e27679ea09cb1543b82dfb8a16dd skip-tests-musl.patch
4171b52abb9a34cc30ad9d737a6d4fc94d7365781f13522eef9111e2fc34f08f3206508471b2c2ab70ae95ecb110bc569535ca949bded3e8896c83e9d752d06e skip-tests-alpine.patch 4171b52abb9a34cc30ad9d737a6d4fc94d7365781f13522eef9111e2fc34f08f3206508471b2c2ab70ae95ecb110bc569535ca949bded3e8896c83e9d752d06e skip-tests-alpine.patch
86dcba9b53048b01c8912bdcfc7e9372a37f196352ef366d5192af204cb1bad95c31803991e0a408ab16b0c7094846df5ef95243bb09894e3dc9b3c4e5daaa43 unbundle-libunistring.patch" 86dcba9b53048b01c8912bdcfc7e9372a37f196352ef366d5192af204cb1bad95c31803991e0a408ab16b0c7094846df5ef95243bb09894e3dc9b3c4e5daaa43 unbundle-libunistring.patch
3ad909028d887429248b79ef3f2289d8934a5dd9337e51abbf05cece2fed3e2b12d228a587ebcbd0e775380b86825a6f796d2d0392b24384f5f8d298f78965ea fix-crash-of-xgettext-with--its-option.patch"
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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment