From: "Yann E. MORIN" <yann.morin.1998@free.fr>
To: Peter Seiderer <ps.report@gmx.net>
Cc: buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH v1] package/readline: add upstream patch to fix crash with invalid locale specification
Date: Mon, 24 Apr 2023 20:43:18 +0200 [thread overview]
Message-ID: <20230424184318.GR2696@scaer> (raw)
In-Reply-To: <20230322162538.19202-1-ps.report@gmx.net>
Peter, All,
On 2023-03-22 17:25 +0100, Peter Seiderer spake thusly:
> Add upstream patch to fix crash with invalid locale specification (see [1]
> for details).
>
> Fixes:
>
> - https://bugs.busybox.net/show_bug.cgi?id=15456
>
> [1] https://lists.gnu.org/archive/html/bug-readline/2022-10/msg00002.html
>
> Signed-off-by: Peter Seiderer <ps.report@gmx.net>
Applied to master, thanks.
Regards,
Yann E. MORIN.
> ---
> ...ch-1-fix-crash-when-readline-is-star.patch | 41 +++++++++++++++++++
> 1 file changed, 41 insertions(+)
> create mode 100644 package/readline/0002-Readline-8.2-patch-1-fix-crash-when-readline-is-star.patch
>
> diff --git a/package/readline/0002-Readline-8.2-patch-1-fix-crash-when-readline-is-star.patch b/package/readline/0002-Readline-8.2-patch-1-fix-crash-when-readline-is-star.patch
> new file mode 100644
> index 0000000000..b0f784b8ba
> --- /dev/null
> +++ b/package/readline/0002-Readline-8.2-patch-1-fix-crash-when-readline-is-star.patch
> @@ -0,0 +1,41 @@
> +From b8d91eab12603fa88e095248855f5f772d182d05 Mon Sep 17 00:00:00 2001
> +From: Chet Ramey <chet.ramey@case.edu>
> +Date: Wed, 5 Oct 2022 10:41:16 -0400
> +Subject: [PATCH] Readline-8.2 patch 1: fix crash when readline is started with
> + an invalid locale specification
> +
> +[Upstream: https://git.savannah.gnu.org/cgit/readline.git/patch/?id=7274faabe97ce53d6b464272d7e6ab6c1392837b
> + Stripped unrelated ._.gitignore change]
> +Signed-off-by: Peter Seiderer <ps.report@gmx.net>
> +---
> + nls.c | 4 ++++
> + patchlevel | 2 +-
> + 2 files changed, 5 insertions(+), 1 deletion(-)
> +
> +diff --git a/nls.c b/nls.c
> +index 5c6a13b..8c027d6 100644
> +--- a/nls.c
> ++++ b/nls.c
> +@@ -141,6 +141,10 @@ _rl_init_locale (void)
> + if (lspec == 0)
> + lspec = "";
> + ret = setlocale (LC_CTYPE, lspec); /* ok, since it does not change locale */
> ++ if (ret == 0 || *ret == 0)
> ++ ret = setlocale (LC_CTYPE, (char *)NULL);
> ++ if (ret == 0 || *ret == 0)
> ++ ret = RL_DEFAULT_LOCALE;
> + #else
> + ret = (lspec == 0 || *lspec == 0) ? RL_DEFAULT_LOCALE : lspec;
> + #endif
> +diff --git a/patchlevel b/patchlevel
> +index d8c9df7..fdf4740 100644
> +--- a/patchlevel
> ++++ b/patchlevel
> +@@ -1,3 +1,3 @@
> + # Do not edit -- exists only for use by patch
> +
> +-0
> ++1
> +--
> +2.39.2
> +
> --
> 2.39.2
>
> _______________________________________________
> buildroot mailing list
> buildroot@buildroot.org
> https://lists.buildroot.org/mailman/listinfo/buildroot
--
.-----------------.--------------------.------------------.--------------------.
| Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ |
| +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. |
'------------------------------^-------^------------------^--------------------'
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
prev parent reply other threads:[~2023-04-24 18:43 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-03-22 16:25 [Buildroot] [PATCH v1] package/readline: add upstream patch to fix crash with invalid locale specification Peter Seiderer
2023-04-24 17:34 ` Stefan Agner
2023-04-24 18:45 ` Yann E. MORIN
2023-05-02 6:48 ` Peter Korsgaard
2023-04-24 18:43 ` Yann E. MORIN [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230424184318.GR2696@scaer \
--to=yann.morin.1998@free.fr \
--cc=buildroot@buildroot.org \
--cc=ps.report@gmx.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox