Hi Marcus,
Marcus Meissner wrote:
Hi,
Coverity thinks we miss NULL checks and yes, we do. Added some.
(...)
- wstrbuf_init(&buf);
- if (!wstrbuf_init(&buf))
range_to_string(This, &buf);return E_OUTOFMEMORY;
- if(buf.buf)
*p = SysAllocString(buf.buf);
*p = SysAllocString(buf.buf); wstrbuf_finish(&buf);
TRACE("ret %s\n", debugstr_w(*p));
if (!*p)
return E_OUTOFMEMORY;
return S_OK;
}
This check is not meant to check allocation failure, but to check if range_to_string set it to NULL. We even have a tests for this. More error handling is a good thing to do, but this check should remain unchanged.
Thanks, Jacek