jsproxy: Avoid potential NULL dereference (Coverity).
This commit is contained in:
parent
7b8aa8606c
commit
0dda8a14db
|
@ -103,9 +103,12 @@ static inline WCHAR *strdupAW( const char *src, DWORD len )
|
||||||
if (src)
|
if (src)
|
||||||
{
|
{
|
||||||
int dst_len = MultiByteToWideChar( CP_ACP, 0, src, len, NULL, 0 );
|
int dst_len = MultiByteToWideChar( CP_ACP, 0, src, len, NULL, 0 );
|
||||||
if ((dst = heap_alloc( (dst_len + 1) * sizeof(WCHAR) ))) len = MultiByteToWideChar( CP_ACP, 0, src, len, dst, dst_len );
|
if ((dst = heap_alloc( (dst_len + 1) * sizeof(WCHAR) )))
|
||||||
|
{
|
||||||
|
len = MultiByteToWideChar( CP_ACP, 0, src, len, dst, dst_len );
|
||||||
dst[dst_len] = 0;
|
dst[dst_len] = 0;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
return dst;
|
return dst;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue