This is the mail archive of the libc-alpha@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] regcomp: Fix off-by-one bug in build_equiv_class [BZ #23396]


On 07/13/2018 08:30 PM, Carlos O'Donell wrote:
On 07/13/2018 11:35 AM, Florian Weimer wrote:
This bug is very similar to bug 23036: The existing code assumed that
the length count included the length byte itself.

2018-07-13  Florian Weimer<fweimer@redhat.com>

	[BZ #23396]
	* posix/regcomp.c (build_equiv_class): When comparing weights, do
	not compare an extra byte after the end of the weights.
There is another loop similar to this in fnmatch_loop.c, could you please
have a look at that one too. It appears to be correct, you pointed out to
me that it does 'cnt == len', but it would be good to have a definitive
answer there.

I enhanced my enumeration tester to cover fnmatch too, and it produces the expected result for [[=a=]] (matching the fixed regex result), without further changes.

Thanks,
Florian


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]