Commit 3aa970c9 authored by Jacek Caban's avatar Jacek Caban Committed by Alexandre Julliard

mshtml: Fixed buffer handling in set_nsstyle_attr.

parent b5d68c70
......@@ -314,8 +314,6 @@ HRESULT set_nsstyle_attr(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, LPCW
LPWSTR val = NULL;
nsresult nsres;
static const PRUnichar wszEmpty[] = {0};
if(flags & ATTR_FIX_PX)
val = fix_px_value(value);
if(flags & ATTR_FIX_URL)
......@@ -323,8 +321,7 @@ HRESULT set_nsstyle_attr(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, LPCW
nsAString_InitDepend(&str_name, style_tbl[sid].name);
nsAString_InitDepend(&str_value, val ? val : value);
nsAString_InitDepend(&str_empty, wszEmpty);
heap_free(val);
nsAString_InitDepend(&str_empty, emptyW);
nsres = nsIDOMCSSStyleDeclaration_SetProperty(nsstyle, &str_name, &str_value, &str_empty);
if(NS_FAILED(nsres))
......@@ -333,6 +330,7 @@ HRESULT set_nsstyle_attr(nsIDOMCSSStyleDeclaration *nsstyle, styleid_t sid, LPCW
nsAString_Finish(&str_name);
nsAString_Finish(&str_value);
nsAString_Finish(&str_empty);
heap_free(val);
return S_OK;
}
......
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