setlocale: wrong var passed to __get_locale

Submitted by Julien Ramseier on Nov. 19, 2018, 4:03 p.m.

Details

Message ID 62CC16E8-B5B1-451A-B041-C74529DF8EC6@gmail.com
State New
Series "setlocale: wrong var passed to __get_locale"
Headers show

Commit Message

Julien Ramseier Nov. 19, 2018, 4:03 p.m.
This was introduced by commit d88e5dfa8b989dafff4b748bfb3cba3512c8482e

Patch hide | download patch | download mbox

diff --git a/src/locale/setlocale.c b/src/locale/setlocale.c
index 637e7aa0..2bc7b500 100644
--- a/src/locale/setlocale.c
+++ b/src/locale/setlocale.c
@@ -34,7 +34,7 @@  char *setlocale(int cat, const char *name)
 					part[z-p] = 0;
 					if (*z) p = z+1;
 				}
-				lm = __get_locale(i, name);
+				lm = __get_locale(i, part);
 				if (lm == LOC_MAP_FAILED) {
 					UNLOCK(lock);
 					return 0;

Comments

Rich Felker Nov. 19, 2018, 4:49 p.m.
On Mon, Nov 19, 2018 at 05:03:14PM +0100, Julien Ramseier wrote:
> This was introduced by commit d88e5dfa8b989dafff4b748bfb3cba3512c8482e
> 
> diff --git a/src/locale/setlocale.c b/src/locale/setlocale.c
> index 637e7aa0..2bc7b500 100644
> --- a/src/locale/setlocale.c
> +++ b/src/locale/setlocale.c
> @@ -34,7 +34,7 @@ char *setlocale(int cat, const char *name)
>  					part[z-p] = 0;
>  					if (*z) p = z+1;
>  				}
> -				lm = __get_locale(i, name);
> +				lm = __get_locale(i, part);
>  				if (lm == LOC_MAP_FAILED) {
>  					UNLOCK(lock);
>  					return 0;

Oops, this probably means I have some commits that I forgot to push..

Rich