This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


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

Re: [PATCH] Fix another MBS regex failure


Jakub Jelinek <jakub@redhat.com> writes:

> Hi!
> 
> The following testcase fails with MBS_SUPPORT enabled regex.
> There are two issues: the code is swapping strings if second string is zero
> size and first non-NULL, but we were not swapping their MBS data together
> with them (cstring* are not used any more, so it is enough to swap
> mbs_offset* and csize*). Also, if stop is past csize1 + csize2,
> count_mbs_length would return -1 and things would fail, because end_match_2
> would point before string2 (unlike non-MBS, where stop however large is
> simply added to string2 to compute end_match_2).
> 
> 2001-05-11  Jakub Jelinek  <jakub@redhat.com>
> 
> 	* posix/regex.c (re_match_2_internal): Swap mbs_offset and csize
> 	as well if swapping strings.
> 	Make sure stop is not past end of second string.
> 	* posix/bug-regex4.c: New test.
> 	* posix/Makefile (tests): Add bug-regex4.

Committed,

Thanks,
Andreas
-- 
 Andreas Jaeger
  SuSE Labs aj@suse.de
   private aj@arthur.inka.de
    http://www.suse.de/~aj


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