[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH v2 1/2] poke: fix handling of alien tokens
From: |
Jose E. Marchesi |
Subject: |
Re: [PATCH v2 1/2] poke: fix handling of alien tokens |
Date: |
Wed, 01 Nov 2023 14:10:54 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) |
> 2023-11-01 Mohammad-Reza Nabipoor <mnabipoor@gnu.org>
>
> * poke/pk-ios.c (pk_ios_alien_token_handler): Fix handling of
> alien tokens of length 1, i.e. $<.> tokens.
> ---
> ChangeLog | 5 +++++
> poke/pk-ios.c | 4 ++--
> 2 files changed, 7 insertions(+), 2 deletions(-)
>
> diff --git a/ChangeLog b/ChangeLog
> index a7bfa9cf..7d3c92fc 100644
> --- a/ChangeLog
> +++ b/ChangeLog
> @@ -1,3 +1,8 @@
> +2023-11-01 Mohammad-Reza Nabipoor <mnabipoor@gnu.org>
> +
> + * poke/pk-ios.c (pk_ios_alien_token_handler): Fix handling of
> + alien tokens of length 1, i.e. $<.> tokens.
> +
> 2023-10-30 Jose E. Marchesi <jemarch@gnu.org>
>
> * poke/pk-help.pk (pk_help): Hint at activating the page at the
> diff --git a/poke/pk-ios.c b/poke/pk-ios.c
> index 4ebd44b6..a94604ad 100644
> --- a/poke/pk-ios.c
> +++ b/poke/pk-ios.c
> @@ -245,10 +245,10 @@ pk_ios_alien_token_handler (char delimiter,
>
> assert (delimiter == '<');
>
> - if (id_len == 3)
> + if (id_len == 2) /* <> */
> goto error;
I think that was supposed to be < 2. Empty $<> can be weird, but useful
at some point.
> - /* Extract the IOS handler from the $<...> string. */
> + /* Extract the IOS handler from the <...> string. */
> handler = xmalloc (id_len - 2 + 1);
> memcpy (handler, id + 1, id_len - 2);
> handler[id_len - 2] = '\0';