+ if (!boundsInBlocks) { + size = This->info.width_in_blocks * This->info.height_in_blocks * This->info.bytes_per_block; + if (bufferSize < size) return E_INVALIDARG; + memcpy(buffer, This->data, size); + return S_OK; + }
This ignores the stride passed in. Are you sure about this?