Re: [PATCH v4 0/2] MR6294: mlang: Fix bug when multibyte string truncation in ConvertINetMultiByteToUnicode
23 Aug
2024
23 Aug
'24
4:56 p.m.
Alexandre Julliard (@julliard) commented about dlls/mlang/mlang.c:
default: if (*pcSrcSize == -1) *pcSrcSize = lstrlenA(pSrcStr); - + while (MultiByteToWideChar(dwEncoding, MB_ERR_INVALID_CHARS, pSrcStr, *pcSrcSize, 0, 0) == 0) + { + (*pcSrcSize)--; + }
This will truncate at the first invalid char, it would need a test to show that this is the correct behavior. Also it won't do the right thing for a zero-length string. -- https://gitlab.winehq.org/wine/wine/-/merge_requests/6294#note_79775
483
Age (days ago)
483
Last active (days ago)
0 comments
1 participants
participants (1)
-
Alexandre Julliard (@julliard)