mirror of
git://source.winehq.org/git/wine.git
synced 2024-10-31 10:41:12 +00:00
wmc: Duplicate wine_cp_wcstombs check here too (Coverity).
This commit is contained in:
parent
0f6591af9d
commit
29bdb32592
1 changed files with 7 additions and 2 deletions
|
@ -396,8 +396,13 @@ static char *make_string(WCHAR *uc, int len, int codepage)
|
|||
else
|
||||
mlen = wine_utf8_wcstombs(0, uc, unistrlen(uc)+1, NULL, 0);
|
||||
cc = tmp = xmalloc(mlen);
|
||||
if (cpdef) {
|
||||
if((i = wine_cp_wcstombs(cpdef, 0, uc, unistrlen(uc)+1, tmp, mlen, NULL, NULL)) < 0)
|
||||
internal_error(__FILE__, __LINE__, "Buffer overflow? code %d\n", i);
|
||||
} else {
|
||||
if((i = wine_utf8_wcstombs(0, uc, unistrlen(uc)+1, tmp, mlen)) < 0)
|
||||
internal_error(__FILE__, __LINE__, "Buffer overflow? code %d\n", i);
|
||||
}
|
||||
*cptr++ = ' ';
|
||||
*cptr++ = '"';
|
||||
for(i = b = 0; i < len; i++, cc++)
|
||||
|
|
Loading…
Reference in a new issue