We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
The return type of sizeof is size_t which must be printed using %zu. Technically using the wrong format specifier (%llu in this case) invokes UB
sizeof
size_t
%zu
%llu
DbgPrint("Short read of read MmPfnDatabase pointer %p as provided by userspace (read %llu of %llu bytes)\n", MmPfnDatabaseUnsafe, bytesRead, sizeof(PVOID)); DbgPrint("Failed to read PFN from PFN database at %p (%p[0x%16llx]): NTSTATUS 0x%08lx, transferred %llu of %llu bytes\n", srcAddress.VirtualAddress, MmPfnDatabase, pfnArray[pfnIdx], s, numRead, sizeof(struct PFN));
https://github.com/countercept/ModuleStomping/blob/56c778b37229606818487b87e96d74b1db858817/driver/driver.c#L195
https://github.com/countercept/ModuleStomping/blob/56c778b37229606818487b87e96d74b1db858817/driver/driver.c#L342
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The return type of
sizeof
issize_t
which must be printed using%zu
. Technically using the wrong format specifier (%llu
in this case) invokes UBhttps://github.com/countercept/ModuleStomping/blob/56c778b37229606818487b87e96d74b1db858817/driver/driver.c#L195
https://github.com/countercept/ModuleStomping/blob/56c778b37229606818487b87e96d74b1db858817/driver/driver.c#L342
The text was updated successfully, but these errors were encountered: