Commit 9f4d05b1 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Alloc proper BSTR size in return_nscstr.

parent 46de3fcf
...@@ -29,6 +29,7 @@ function test_xhr() { ...@@ -29,6 +29,7 @@ function test_xhr() {
next_test(); next_test();
} }
var onload_func = xhr.onload = function() { var onload_func = xhr.onload = function() {
ok(xhr.statusText === "OK", "statusText = " + xhr.statusText);
if(complete_cnt++) if(complete_cnt++)
next_test(); next_test();
}; };
......
...@@ -80,7 +80,7 @@ static HRESULT return_nscstr(nsresult nsres, nsACString *nscstr, BSTR *p) ...@@ -80,7 +80,7 @@ static HRESULT return_nscstr(nsresult nsres, nsACString *nscstr, BSTR *p)
if(*str) { if(*str) {
len = MultiByteToWideChar(CP_UTF8, 0, str, -1, NULL, 0); len = MultiByteToWideChar(CP_UTF8, 0, str, -1, NULL, 0);
*p = SysAllocStringLen(NULL, len); *p = SysAllocStringLen(NULL, len - 1);
if(!*p) { if(!*p) {
nsACString_Finish(nscstr); nsACString_Finish(nscstr);
return E_OUTOFMEMORY; return E_OUTOFMEMORY;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment