summaryrefslogtreecommitdiff
path: root/fipstest.cpp
diff options
context:
space:
mode:
authorweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2005-07-12 04:23:32 +0000
committerweidai <weidai@57ff6487-cd31-0410-9ec3-f628ee90f5f0>2005-07-12 04:23:32 +0000
commitd5ebf62bed594d1fe6ab616a6bbcbcf0a5892d47 (patch)
tree4b03760892a97a9bc452ebe8b7793bbebd402ad4 /fipstest.cpp
parentfa39f51809b4da54a5c2adb3e183b1a625cefb92 (diff)
downloadcryptopp-d5ebf62bed594d1fe6ab616a6bbcbcf0a5892d47.tar.gz
port to MSVC .NET 2005 beta 2
git-svn-id: svn://svn.code.sf.net/p/cryptopp/code/trunk/c5@198 57ff6487-cd31-0410-9ec3-f628ee90f5f0
Diffstat (limited to 'fipstest.cpp')
-rw-r--r--fipstest.cpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/fipstest.cpp b/fipstest.cpp
index a9245c8..e5f0859 100644
--- a/fipstest.cpp
+++ b/fipstest.cpp
@@ -19,7 +19,7 @@ unsigned long g_macFileLocation = 0;
const byte * CRYPTOPP_API GetActualMacAndLocation(unsigned int &macSize, unsigned int &fileLocation)
{
- macSize = g_actualMac.size();
+ macSize = (unsigned int)g_actualMac.size();
fileLocation = g_macFileLocation;
return g_actualMac;
}
@@ -261,7 +261,7 @@ bool IntegrityCheckModule(const char *moduleFilename, const byte *expectedModule
IMAGE_NT_HEADERS *phnt = (IMAGE_NT_HEADERS *)((byte *)h + ph->e_lfanew);
IMAGE_SECTION_HEADER *phs = IMAGE_FIRST_SECTION(phnt);
DWORD nSections = phnt->FileHeader.NumberOfSections;
- DWORD currentFilePos = 0;
+ size_t currentFilePos = 0;
while (nSections--)
{
@@ -274,13 +274,13 @@ bool IntegrityCheckModule(const char *moduleFilename, const byte *expectedModule
unsigned int sectionSize = STDMIN(phs->SizeOfRawData, phs->Misc.VirtualSize);
const byte *sectionMemStart = memBase + phs->VirtualAddress;
unsigned int sectionFileStart = phs->PointerToRawData;
- unsigned int subSectionStart = 0, nextSubSectionStart;
+ size_t subSectionStart = 0, nextSubSectionStart;
do
{
const byte *subSectionMemStart = sectionMemStart + subSectionStart;
- unsigned int subSectionFileStart = sectionFileStart + subSectionStart;
- unsigned int subSectionSize = sectionSize - subSectionStart;
+ size_t subSectionFileStart = sectionFileStart + subSectionStart;
+ size_t subSectionSize = sectionSize - subSectionStart;
nextSubSectionStart = 0;
unsigned int entriesToReadFromDisk[] = {IMAGE_DIRECTORY_ENTRY_IMPORT, IMAGE_DIRECTORY_ENTRY_IAT};
@@ -301,7 +301,7 @@ bool IntegrityCheckModule(const char *moduleFilename, const byte *expectedModule
// skip over the MAC
verifier.Put(subSectionMemStart, expectedModuleMac - subSectionMemStart);
verifier.Put(expectedModuleMac + macSize, subSectionSize - macSize - (expectedModuleMac - subSectionMemStart));
- macFileLocation = subSectionFileStart + (expectedModuleMac - subSectionMemStart);
+ macFileLocation = (unsigned long)(subSectionFileStart + (expectedModuleMac - subSectionMemStart));
}
else
verifier.Put(subSectionMemStart, subSectionSize);