Commit ec30f6de authored by Paul Vriens's avatar Paul Vriens Committed by Alexandre Julliard

ole32/stg_bigblockfile: Check page before use (Coverity).

parent de087179
......@@ -861,18 +861,18 @@ static HRESULT WINAPI ImplBIGBLOCKFILE_WriteAt(
MappedPage *page = BIGBLOCKFILE_GetMappedView(This, page_index);
TRACE("page %i, offset %u, bytes_to_page %u, bytes_left %u\n",
page->page_index, offset_in_page, bytes_to_page, bytes_left);
page ? page->page_index : 0, offset_in_page, bytes_to_page, bytes_left);
if (page->mapped_bytes < bytes_to_page)
if (!page)
{
ERR("Not enough bytes mapped to the page. This should never happen\n");
ERR("Unable to get a page to write. This should never happen\n");
rc = E_FAIL;
break;
}
if (!page)
if (page->mapped_bytes < bytes_to_page)
{
ERR("Unable to get a page to write. This should never happen\n");
ERR("Not enough bytes mapped to the page. This should never happen\n");
rc = E_FAIL;
break;
}
......
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