[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#18580: [PATCH] dfa: check end of an input buffer after a transition
From: |
Jim Meyering |
Subject: |
bug#18580: [PATCH] dfa: check end of an input buffer after a transition in non-UTF8 multibyte locales |
Date: |
Sun, 5 Oct 2014 09:49:59 -0700 |
On Sun, Oct 5, 2014 at 12:27 AM, Norihiro Tanaka <address@hidden> wrote:
> Jim Meyering wrote:
> Actually, we need yet another byte at the end, and one more prior:
>
>> When I built with ASAN and rawhide's gcc version 4.9.1 20140930
>> (Red Hat 4.9.1-11) (GCC), using this command:
>>
>> make CFLAGS=-ggdb3 AM_CFLAGS=-fsanitize=address \
>> AM_LDFLAGS='-fsanitize=address -static-libasan' check
>>
>> I saw two test failures. You can see that the first test triggers an access
>> one past the end, and all others trigger an access one prior to the
>> beginning.
>> Here is a summary of the problems:
>
> Thanks, if begline option (-x) is set, one more prior is used. OTOH,
> for an access one past the end, I believe the another patch attached
> with this bug fixes it. dfaexec for non-UTF8 locales doesn't check the
> end of an input buffer and doesn't count newline correctly.
Thank you.
I have added a test case to your post-transit_state buffer-length
checking patch, and shrank the eolbytes buffer by one byte, now
that I see this patch prevents the overrun. Here's the patch I'll
push later today:
0001-dfa-check-end-of-input-buffer-after-transition-in-no.patch
Description: Binary data
- bug#18580: [PATCH] dfa: check end of an input buffer after a transition in non-UTF8 multibyte locales, (continued)
- bug#18580: [PATCH] dfa: check end of an input buffer after a transition in non-UTF8 multibyte locales, Jim Meyering, 2014/10/02
- bug#18580: [PATCH] dfa: check end of an input buffer after a transition in non-UTF8 multibyte locales, Norihiro Tanaka, 2014/10/02
- bug#18580: [PATCH] dfa: check end of an input buffer after a transition in non-UTF8 multibyte locales, Norihiro Tanaka, 2014/10/02
- bug#18580: [PATCH] dfa: check end of an input buffer after a transition in non-UTF8 multibyte locales, Norihiro Tanaka, 2014/10/02
- bug#18580: [PATCH] dfa: check end of an input buffer after a transition in non-UTF8 multibyte locales, Norihiro Tanaka, 2014/10/02
- bug#18580: [PATCH] dfa: check end of an input buffer after a transition in non-UTF8 multibyte locales, Norihiro Tanaka, 2014/10/04
- bug#18580: [PATCH] dfa: check end of an input buffer after a transition in non-UTF8 multibyte locales, Paul Eggert, 2014/10/04
- bug#18580: [PATCH] dfa: check end of an input buffer after a transition in non-UTF8 multibyte locales, Jim Meyering, 2014/10/05
- bug#18580: [PATCH] dfa: check end of an input buffer after a transition in non-UTF8 multibyte locales, Paul Eggert, 2014/10/05
- bug#18580: [PATCH] dfa: check end of an input buffer after a transition in non-UTF8 multibyte locales, Norihiro Tanaka, 2014/10/05
- bug#18580: [PATCH] dfa: check end of an input buffer after a transition in non-UTF8 multibyte locales,
Jim Meyering <=
- bug#18580: [PATCH] dfa: check end of an input buffer after a transition in non-UTF8 multibyte locales, Norihiro Tanaka, 2014/10/05
- bug#18580: [PATCH] dfa: check end of an input buffer after a transition in non-UTF8 multibyte locales, Jim Meyering, 2014/10/05
- bug#18580: [PATCH] dfa: check end of an input buffer after a transition in non-UTF8 multibyte locales, Norihiro Tanaka, 2014/10/06
- bug#18580: [PATCH] dfa: check end of an input buffer after a transition in non-UTF8 multibyte locales, Jim Meyering, 2014/10/06
- bug#18580: [PATCH] dfa: check end of an input buffer after a transition in non-UTF8 multibyte locales, Norihiro Tanaka, 2014/10/07
- bug#18580: [PATCH] dfa: check end of an input buffer after a transition in non-UTF8 multibyte locales, Jim Meyering, 2014/10/06
- bug#18580: [PATCH] dfa: check end of an input buffer after a transition in non-UTF8 multibyte locales, Norihiro Tanaka, 2014/10/06
- bug#18580: [PATCH] dfa: check end of an input buffer after a transition in non-UTF8 multibyte locales, Jim Meyering, 2014/10/07
- bug#18580: [PATCH] dfa: check end of an input buffer after a transition in non-UTF8 multibyte locales, Norihiro Tanaka, 2014/10/08