Module: wine Branch: master Commit: 9351596538d012c6ed11c59576246f524f90aa3f URL: http://source.winehq.org/git/wine.git/?a=commit;h=9351596538d012c6ed11c59576...
Author: Nikolay Sivov nsivov@codeweavers.com Date: Sun May 31 15:11:56 2015 +0300
dwrite: Fix potential null pointer dereference in GetInlineObject() (Coverity).
---
dlls/dwrite/layout.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/dlls/dwrite/layout.c b/dlls/dwrite/layout.c index cb191b0..365f0b2 100644 --- a/dlls/dwrite/layout.c +++ b/dlls/dwrite/layout.c @@ -2016,8 +2016,11 @@ static HRESULT WINAPI dwritetextlayout_GetInlineObject(IDWriteTextLayout2 *iface
TRACE("(%p)->(%u %p %p)\n", This, position, object, r);
+ if (position >= This->len) + return S_OK; + range = get_layout_range_by_pos(This, position); - *object = range ? range->object : NULL; + *object = range->object; if (*object) IDWriteInlineObject_AddRef(*object);