* successfuly read the data. Workaround it - preclear (not postclear) the
* buffer and do not make any other assumptions about the data read.
*/
- memset(address,0,PAGE_SIZE); /* pre-clear the buffer */
- Mdl=MmCreateMdl(NULL,address,PAGE_SIZE); /* FIXME: Deprecated in favor of IoAllocateMdl() */
+ memset(address,0,length); /* pre-clear the buffer */
+ Mdl=MmCreateMdl(NULL,address,length); /* FIXME: Deprecated in favor of IoAllocateMdl() */
g_assert(Mdl!=NULL);
MmBuildMdlForNonPagedPool(Mdl);
KeInitializeEvent(&Event,NotificationEvent,FALSE);
if (after_eof)
g_assert(got==0);
else
- g_assert(got<=PAGE_SIZE);
- after_eof=(got<PAGE_SIZE);
+ g_assert(got<=offset_end-offset_start);
+ after_eof=(got<offset_end-offset_start);
/* Unmark 'building' flags. */
for (
offset_built=offset_start;