mirror of
git://git.code.sf.net/p/zsh/code
synced 2024-05-19 06:26:04 +02:00
52214: allow extra byte for nul terminator in allocation
This commit is contained in:
parent
a920e368b8
commit
83f8a71a7c
|
@ -1,5 +1,7 @@
|
|||
2023-10-10 Oliver Kiddle <opk@zsh.org>
|
||||
|
||||
* 52214: Src/subst.c: allow extra byte for nul in allocation
|
||||
|
||||
* unposted (cf. 52166): Functions/Misc/run-help-svk:
|
||||
remove obsolete helper for svk
|
||||
|
||||
|
|
|
@ -1506,7 +1506,7 @@ substevalchar(char *ptr)
|
|||
}
|
||||
#ifdef MULTIBYTE_SUPPORT
|
||||
else if (isset(MULTIBYTE) && ires > 127) {
|
||||
ptr = zhalloc(MB_CUR_MAX);
|
||||
ptr = zhalloc(MB_CUR_MAX+1);
|
||||
len = ucs4tomb((unsigned int)ires & 0xffffffff, ptr);
|
||||
}
|
||||
if (len <= 0)
|
||||
|
|
Loading…
Reference in New Issue