All of lore.kernel.org
 help / color / mirror / Atom feed
From: Denis Kenzior <denkenz@gmail.com>
To: ell@lists.01.org
Subject: Re: [PATCH 2/2] utf8: Fix expected bytes in l_utf8_get_codepoint
Date: Wed, 20 Mar 2019 20:09:00 -0500	[thread overview]
Message-ID: <48391be5-1a49-f836-67b7-1523fd9aa34a@gmail.com> (raw)
In-Reply-To: <20190320233145.8063-2-michael.tretter@posteo.net>

[-- Attachment #1: Type: text/plain, Size: 667 bytes --]

Hi Michael,

On 03/20/2019 06:31 PM, Michael Tretter wrote:
> UTF-8 requires the form 10xxxxxx for the second, third and forth bytes
> of a well-formed byte sequences. Therefore, comparing with 0 is not
> sufficient to exclude ill-formed byte sequences, but the first two bit
> must follow the specified form.
> 
> Without this check, iwd crashes if it encounters Latin-1 Supplement
> encoded SSIDs during scanning, because they are erroneously accepted as
> valid UTF-8.
> ---
>   ell/utf8.c | 2 +-
>   1 file changed, 1 insertion(+), 1 deletion(-)
> 

Good catch! That bug has been in there since 2011.

Both applied, thanks.

Regards,
-Denis

      reply	other threads:[~2019-03-21  1:09 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-20 23:31 [PATCH 1/2] unit: add utf8_validate_test80 test Michael Tretter
2019-03-20 23:31 ` [PATCH 2/2] utf8: Fix expected bytes in l_utf8_get_codepoint Michael Tretter
2019-03-21  1:09   ` Denis Kenzior [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=48391be5-1a49-f836-67b7-1523fd9aa34a@gmail.com \
    --to=denkenz@gmail.com \
    --cc=ell@lists.01.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.