New coverity run Feb 7, 14 new warnings

Dan Kegel dank at kegel.com
Sun Feb 8 19:01:04 CST 2009


Alistair wrote:

>> 873     FORWARD_NULL    HTMLStyle_put_fontWeight  dlls/mshtml/htmlstyle.c
>
> NULL is a valid value to be passed though to gecko.

Here's more of the error:

dlls/mshtml/htmlstyle.c

Event var_deref_model: Variable "v" tracked as NULL was passed to a
function that dereferences it. [model]
Also see events: [var_compare_op]

646  	        return set_nsstyle_attr(This->nsstyle, STYLEID_FONT_WEIGHT, v, 0);
647  	    }
648  	

htmlstyle.c:

216  	HRESULT set_nsstyle_attr(nsIDOMCSSStyleDeclaration *nsstyle,
styleid_t sid, LPCWSTR value, DWORD flags)
217  	{
218  	    nsAString str_name, str_value, str_empty;
219  	    LPWSTR val = NULL;
220  	    nsresult nsres;
221  	
222  	    static const PRUnichar wszEmpty[] = {0};
223  	

At conditional (1): "flags & 1 != 0" taking false path

224  	    if(flags & ATTR_FIX_PX)

Event deref_parm_in_call: Dereferenced parameter "value" in the
function "fix_px_value" [model]
Also see events: [deref_parm_in_call]

225  	        val = fix_px_value(value);

At conditional (2): "flags & 2 != 0" taking true path

226  	    if(flags & ATTR_FIX_URL)

Event deref_parm_in_call: Dereferenced parameter "value" in the
function "fix_url_value" [model]
Also see events: [deref_parm_in_call]

227  	        val = fix_url_value(value);


So it's not passing it to gecko, it's passing it to another mshtml function
that maybe passes it to fix*value() which dereferences it.

Is it a bug?  I don't know those flags well enough.
- Dan



More information about the wine-devel mailing list