sync with OpenBSD -current

This commit is contained in:
purplerain 2024-08-06 22:23:11 +00:00
parent acb2a22980
commit 455fea1627
Signed by: purplerain
GPG key ID: F42C07F07E2E35B7
229 changed files with 25075 additions and 13981 deletions

View file

@ -177,6 +177,8 @@ _XimLookupMBText(
if ((nbytes == 0) || (symbol == NoSymbol)) return count;
if (count > 1) {
if ((unsigned)count >= sizeof(look))
return 0;
memcpy(look, (char *)buffer,count);
look[count] = '\0';
if ((count = im->methods->ctstombs(ic->core.im,
@ -320,6 +322,8 @@ _XimLookupUTF8Text(
if ((nbytes == 0) || (symbol == NoSymbol)) return count;
if (count > 1) {
if ((unsigned)count >= sizeof(look))
return 0;
memcpy(look, (char *)buffer,count);
look[count] = '\0';
if ((count = im->methods->ctstoutf8(ic->core.im,