From 0ce3b29d56632acd1c393714cc8f189496bdeb47 Mon Sep 17 00:00:00 2001 From: Carlos O'Donell Date: Fri, 24 Jun 2016 13:50:22 -0400 Subject: [PATCH] Resolves: #1349906 - Properly handle more invalid --install-langs arguments (#1349906). --- build-locale-archive.c | 7 ++++++- glibc.spec | 5 ++++- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/build-locale-archive.c b/build-locale-archive.c index 5fc93ff..9183972 100644 --- a/build-locale-archive.c +++ b/build-locale-archive.c @@ -642,7 +642,7 @@ int main (int argc, char *argv[]) int install_langs_count = 0; int i; char *install_langs_arg, *ila_start; - char **install_langs_list; + char **install_langs_list = NULL; unsigned int cnt = 0; struct locarhandle tmpl_ah; char *new_locar_fname = NULL; @@ -711,6 +711,11 @@ int main (int argc, char *argv[]) install_langs_arg = NULL; } free (ila_start); + + /* Reject an entire string made up of delimiters. */ + if (install_langs_count == 0) + break; + /* Copy the list. */ install_langs_list = (char **)xmalloc (sizeof(char *) * install_langs_count); install_langs_arg = ila_start = strdup (optarg); diff --git a/glibc.spec b/glibc.spec index 6b0c411..d892901 100644 --- a/glibc.spec +++ b/glibc.spec @@ -1,6 +1,6 @@ %define glibcsrcdir glibc-2.23-499-ga3b4733 %define glibcversion 2.23.90 -%define glibcrelease 24%{?dist} +%define glibcrelease 25%{?dist} # Pre-release tarballs are pulled in from git using a command that is # effectively: # @@ -2069,6 +2069,9 @@ rm -f *.filelist* %endif %changelog +* Fri Jun 24 2016 Carlos O'Donell - 2.23.90-25 +- Properly handle more invalid --install-langs arguments (#1349906). + * Tue Jun 21 2016 Florian Weimer - 2.23.90-24 - Auto-sync with upstream master, commit a3b473373ee43a292f5ec68a7fda6b9cfb26a9b0, fixing these bugs: