mirror of git://sourceware.org/git/glibc.git
Fix out of bounds access in findidxwc (bug 23442)
If usrc is a prefix of cp but one character shorter an out of bounds access to usrc was done.
This commit is contained in:
parent
969c335506
commit
9c79cec8cd
|
@ -1,3 +1,9 @@
|
||||||
|
2018-07-25 Andreas Schwab <schwab@suse.de>
|
||||||
|
|
||||||
|
[BZ #23442]
|
||||||
|
* locale/weightwc.h (findidx): Handle the case where usrc is a
|
||||||
|
prefix of cp but one character too short.
|
||||||
|
|
||||||
2018-07-24 Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
2018-07-24 Adhemerval Zanella <adhemerval.zanella@linaro.org>
|
||||||
|
|
||||||
* NEWS: Add ISO C threads addition.
|
* NEWS: Add ISO C threads addition.
|
||||||
|
|
|
@ -109,7 +109,7 @@ findidx (const int32_t *table,
|
||||||
break;
|
break;
|
||||||
DIAG_POP_NEEDS_COMMENT;
|
DIAG_POP_NEEDS_COMMENT;
|
||||||
|
|
||||||
if (cnt < nhere - 1)
|
if (cnt < nhere - 1 || cnt == len)
|
||||||
{
|
{
|
||||||
cp += 2 * nhere;
|
cp += 2 * nhere;
|
||||||
continue;
|
continue;
|
||||||
|
|
Loading…
Reference in New Issue