From: Florian Weimer <fweimer@redhat.com>
To: Andreas Schwab <schwab@suse.de>
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH] Fix handling of collating elements in fnmatch (bug 17396, bug 16976)
Date: Mon, 07 Jan 2019 15:26:00 -0000 [thread overview]
Message-ID: <87zhscfq0h.fsf@oldenburg2.str.redhat.com> (raw)
In-Reply-To: <mvmin00844a.fsf@suse.de> (Andreas Schwab's message of "Tue, 11 Dec 2018 16:39:17 +0100")
* Andreas Schwab:
> This fixes the same bug in fnmatch that was fixed by commit 7e2f0d2d77 for
> regexp matching. As a side effect it also removes the use of an unbound
> VLA.
>
> [BZ #16976]
> [BZ #17396]
> * posix/fnmatch_loop.c (internal_fnmatch, internal_fnwmatch): When
> looking up collating elements match against (wide) character
> sequence instead of name. Correct alignment adjustment.
> * posix/fnmatch.c: Don't include "../locale/elem-hash.h".
> * posix/Makefile (tests): Add tst-fnmatch4 and tst-fnmatch5.
> (LOCALES): Add cs_CZ.ISO-8859-2.
> * posix/tst-fnmatch4.c: New file.
> * posix/tst-fnmatch5.c: New file.
> + /* Compare the wide char sequence. */
> + && memcmp (startp + 1, &wextra[1],
> + c1 * sizeof (UCHAR)) == 0)
Could this use wmemcmp?
> + if (/* Compare the length of the
> + sequence. */
> + c1 == wextra[0]
> + /* Compare the wide char sequence. */
> + && memcmp (startp + 1, &wextra[1],
> + c1 * sizeof (int32_t)) == 0)
Likewise: Could this use wmemcmp?
Rest of the patch looks fine to me, as far as I can judge such matters.
Please note: The copyright year on the new files needs to be adjusted.
Thanks,
Florian
next prev parent reply other threads:[~2019-01-07 15:26 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-12-11 15:55 Andreas Schwab
2019-01-07 15:26 ` Florian Weimer [this message]
2019-01-09 13:20 ` Andreas Schwab
2019-01-09 13:35 ` Adhemerval Zanella
2019-01-09 14:32 ` Andreas Schwab
2019-01-09 18:33 ` Adhemerval Zanella
2019-01-10 8:43 ` Andreas Schwab
2019-01-10 12:25 ` Adhemerval Zanella
2019-01-10 13:20 ` Andreas Schwab
2019-01-09 14:05 ` Florian Weimer
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=87zhscfq0h.fsf@oldenburg2.str.redhat.com \
--to=fweimer@redhat.com \
--cc=libc-alpha@sourceware.org \
--cc=schwab@suse.de \
/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;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).