From: Mike Frysinger <vapier@gentoo.org>
To: Andreas Schwab <schwab@suse.de>
Cc: libc-alpha@sourceware.org
Subject: Re: [PATCH] Fix fnmatch handling of collating elements (bug 17396, bug 16976)
Date: Thu, 18 Aug 2016 18:04:00 -0000 [thread overview]
Message-ID: <20160818180403.GO21655@vapier.lan> (raw)
In-Reply-To: <mvmwpjgq1xr.fsf@hawking.suse.de>
[-- Attachment #1: Type: text/plain, Size: 1058 bytes --]
On 16 Aug 2016 15:27, Andreas Schwab wrote:
> This fixes the same bug that was fixed by commit 7e2f0d2 for regexp
> matching. As a side effect it also removes the use of an unbound VLA.
i scanned the fnmatch at a high level and looks OK, but might want to
see if anyone with more familiarity chimes in
> --- a/posix/Makefile
> +++ b/posix/Makefile
i was going to say you're missing $(gen-locales) deps for these tests,
but they're in there and have been since Oct 2015. i guess you've had
this patch for a while now ? :)
> +char pattern[LENGTH + 7];
static
> + pattern[0] = '[';
> + pattern[1] = '[';
> + pattern[2] = '.';
> + memset (pattern + 3, 'a', LENGTH);
> + pattern[LENGTH + 3] = '.';
> + pattern[LENGTH + 4] = ']';
> + pattern[LENGTH + 5] = ']';
might be a little more readable:
strcpy (pattern, "[[.", 3);
memset (pattern + 3, 'a', LENGTH);
strcpy (pattern + LENGTH + 3, ".]]", 3);
at least, pattern isn't explicitly NUL terminated in the current test
(other than "pattern" being in the bss, but it's also missing static)
-mike
[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
next prev parent reply other threads:[~2016-08-18 18:04 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-08-16 13:27 Andreas Schwab
2016-08-18 18:04 ` Mike Frysinger [this message]
2016-08-22 7:08 ` Andreas Schwab
2016-08-22 18:35 ` Mike Frysinger
2016-08-23 8:13 ` Andreas Schwab
2016-08-24 19:57 ` Mike Frysinger
2016-08-23 11:18 ` Pedro Alves
2017-04-05 9:35 Andreas Schwab
2018-05-24 12:36 Andreas Schwab
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=20160818180403.GO21655@vapier.lan \
--to=vapier@gentoo.org \
--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).