Re: [PATCH 1/4] mshtml: Return E_POINTER when p is NULL in HTMLStyle_get_pixelLeft.
Hi Jactry, On 09/09/14 08:06, Jactry Zeng wrote:
diff --git a/dlls/mshtml/htmlstyle.c b/dlls/mshtml/htmlstyle.c index f098cb0..9469243 100644 --- a/dlls/mshtml/htmlstyle.c +++ b/dlls/mshtml/htmlstyle.c @@ -2482,6 +2482,8 @@ static HRESULT WINAPI HTMLStyle_get_pixelLeft(IHTMLStyle *iface, LONG *p) HTMLStyle *This = impl_from_IHTMLStyle(iface);
TRACE("(%p)->(%p)\n", This, p); + if(!p) + return E_POINTER;
Since you're adding those checks to many functions, it would probably make sense to move that to get_nsstyle_pixel_val. Jacek
Hi Jacek, 2014-09-09 16:43 GMT+08:00 Jacek Caban <jacek(a)codeweavers.com>:
Since you're adding those checks to many functions, it would probably make sense to move that to get_nsstyle_pixel_val.
I didn't do that because I think checking it before get_nsstyle_pixel_val can save a function calling when p == NULL. :) Thanks for your review! I will send a newer version. -- Regards, Jactry Zeng
participants (2)
-
Jacek Caban -
Jactry Zeng