[PATCH] build-locale-archive sometimes created empty archives

Carlos O'Donell carlos at redhat.com
Thu Sep 17 14:11:39 UTC 2015


On 09/17/2015 10:01 AM, Mike FABIAN wrote:
> build-locale-archive sometimes created empty archives

How did you test this?

Did you try the resulting binary and verify it still works?

I imagine that if you ran the old binary through valgrind it would
raise a failure, but the new binary would not. Did you try that?

I think the fix is correct, but I'd like to make sure we didn't
miss anything else.

Cheers,
Carlos.
 
> (fixed by David Shea) (#1262040)
> 
> -- Mike FABIAN <mfabian at redhat.com> ☏ Office: +49-69-365051027, internal 8875027 睡眠不足はいい仕事の敵だ。
> 
> 
> 0001-build-locale-archive-sometimes-created-empty-archive.patch
> 
> 
> From 26f4d282402dc86c2b20f42fd63b11e63ce3fc74 Mon Sep 17 00:00:00 2001
> From: Mike FABIAN <mfabian at redhat.com>
> Date: Wed, 16 Sep 2015 18:09:29 +0200
> Subject: [PATCH] build-locale-archive sometimes created empty archives
> 
> (fixed by David Shea) (#1262040)
> ---
>  build-locale-archive.c | 3 +--
>  glibc.spec             | 5 ++++-
>  2 files changed, 5 insertions(+), 3 deletions(-)
> 
> diff --git a/build-locale-archive.c b/build-locale-archive.c
> index a506876..5fc93ff 100644
> --- a/build-locale-archive.c
> +++ b/build-locale-archive.c
> @@ -313,8 +313,7 @@ fill_archive (struct locarhandle *tmpl_ah,
>  		/* Add one for "_" and one for the null terminator.  */
>  		size_t len = strlen (install_langs_list[i]) + 2;
>  		char *install_lang = (char *)xmalloc (len);
> -                strncpy (install_lang, install_langs_list[i], len - 2);
> -		install_lang[len - 1] = '\0';
> +                strcpy (install_lang, install_langs_list[i]);
>                  if (strchr (install_lang, '_') == NULL)
>                    strcat (install_lang, "_");
>                  if (strncmp (name, install_lang, strlen (install_lang)) == 0)
> diff --git a/glibc.spec b/glibc.spec
> index 1027516..694621c 100644
> --- a/glibc.spec
> +++ b/glibc.spec
> @@ -1,6 +1,6 @@
>  %define glibcsrcdir  glibc-2.22
>  %define glibcversion 2.22
> -%define glibcrelease 2%{?dist}
> +%define glibcrelease 3%{?dist}
>  # Pre-release tarballs are pulled in from git using a command that is
>  # effectively:
>  #
> @@ -1828,6 +1828,9 @@ rm -f *.filelist*
>  %endif
>  
>  %changelog
> +* Wed Sep 16 2015 Mike FABIAN <mfabian at redhat.com> - 2.22-3
> +- build-locale-archive sometimes created empty archives (fixed by David Shea) (#1262040)
> +
>  * Fri Aug 14 2015 Siddhesh Poyarekar <siddhesh at redhat.com> - 2.22-2
>  - Remove initgroups from default nsswitch.conf (#751450).
>  
> -- 2.4.3
> 
> 
> 
> _______________________________________________
> glibc mailing list
> glibc at lists.fedoraproject.org
> https://admin.fedoraproject.org/mailman/listinfo/glibc



More information about the glibc mailing list