mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-08 21:51:15 +02:00
22522: infinite loop with invalid character in mb_metastrlen()
This commit is contained in:
parent
fbd93a2a82
commit
ec1274f0a3
2 changed files with 7 additions and 2 deletions
|
@ -1,3 +1,8 @@
|
||||||
|
2006-06-27 Peter Stephenson <pws@csr.com>
|
||||||
|
|
||||||
|
* 22522: Src/utils.c: infinite loop with invalid character
|
||||||
|
in mb_metastrlen().
|
||||||
|
|
||||||
2006-06-26 Peter Stephenson <p.w.stephenson@ntlworld.com>
|
2006-06-26 Peter Stephenson <p.w.stephenson@ntlworld.com>
|
||||||
|
|
||||||
* 22519: Test/D07multibyte.ztst: initial multibyte parameter tests.
|
* 22519: Test/D07multibyte.ztst: initial multibyte parameter tests.
|
||||||
|
|
|
@ -3778,7 +3778,7 @@ mb_metastrlen(char *ptr)
|
||||||
/* Reset, treat as single character */
|
/* Reset, treat as single character */
|
||||||
memset(&mb_shiftstate, 0, sizeof(mb_shiftstate));
|
memset(&mb_shiftstate, 0, sizeof(mb_shiftstate));
|
||||||
ptr = laststart + (*laststart == Meta) + 1;
|
ptr = laststart + (*laststart == Meta) + 1;
|
||||||
} else
|
}
|
||||||
laststart = ptr;
|
laststart = ptr;
|
||||||
num++;
|
num++;
|
||||||
num_in_char = 0;
|
num_in_char = 0;
|
||||||
|
|
Loading…
Reference in a new issue