Changeset 884


Ignore:
Timestamp:
4/18/2009 2:22:51 AM (5 years ago)
Author:
lowjoel
Message:

-Fixed a few 64-bit warnings
-Fixed a wrong use of assignment operator (== was intended)
-Corrected the ISAAC code for 64-bit, buffers were assumed to be long enough onlt to fit in a 32-bit integer

Location:
trunk
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/EraserDll/Eraser.cpp

    r834 r884  
    142142    TCHAR szNewName[MAX_PATH]; 
    143143    PTCHAR pszLastSlash; 
    144     E_UINT32 i, j, length; 
    145     size_t index; 
     144    size_t index, i, j, length; 
    146145 
    147146    try { 
     
    21672166 
    21682167            // number of files to process 
    2169             context->m_uProgressWipedFiles = 0; 
     2168            context->m_uProgressWipedFiles = 0u; 
    21702169            context->m_uProgressFiles = context->m_saData.GetSize(); 
    21712170 
  • trunk/EraserDll/File.cpp

    r393 r884  
    374374        DataStreamArray streams; 
    375375        DataStream defaultStream; 
    376         LPDWORD                   lpStatus = 0; 
    377      
     376 
    378377        if (isWindowsNT) { 
    379             FileEncryptionStatus (context->m_strData,lpStatus); 
    380             if (lpStatus=(LPDWORD)FILE_IS_ENCRYPTED) {  
     378            DWORD cryptStatus = 0; 
     379            FileEncryptionStatus (context->m_strData, &cryptStatus); 
     380            if (cryptStatus == FILE_IS_ENCRYPTED) {  
    381381                DecryptFile(context->m_strData,0); 
    382382            } 
  • trunk/EraserDll/Random.cpp

    r54 r884  
    103103static E_INT32 poolMixes = 0; 
    104104 
    105 static E_UINT32 isaacOutputPosition = 0; 
     105static UINT_PTR isaacOutputPosition = 0; 
    106106static LARGE_INTEGER lastCall; 
    107107 
     
    487487 
    488488static void 
    489 clearBuffer(E_PUINT8 buffer, E_UINT32 size) 
     489clearBuffer(E_PUINT8 buffer, UINT_PTR size) 
    490490{ 
    491491    if (size == 0) { 
     
    18111811 
    18121812bool 
    1813 isaacFill(E_PUINT8 puBuffer, E_UINT32 uSize) 
     1813isaacFill(E_PUINT8 puBuffer, UINT_PTR uSize) 
    18141814{ 
    18151815    if (!AfxIsValidAddress(puBuffer, uSize)) { 
     
    18211821 
    18221822    try { 
    1823         E_UINT32 uAvailableData, uPosition = 0; 
     1823        UINT_PTR uAvailableData, uPosition = 0; 
    18241824        E_PUINT8 puRandom = (E_PUINT8)isaacOutput; 
    18251825        while (uPosition < uSize) { 
  • trunk/EraserDll/Random.h

    r286 r884  
    240240isaacSeed(); 
    241241bool 
    242 isaacFill(E_PUINT8, E_UINT32); 
     242isaacFill(E_PUINT8, UINT_PTR); 
    243243 
    244244#endif 
  • trunk/EraserDll/Schneier7Pass.cpp

    r26 r884  
    77    SCHNEIER_PASS_COUNT = 7 
    88}; 
    9 typedef bool (*PFPassFillStrategy)(E_PUINT8, E_UINT32); 
    10 static bool oneFill(E_PUINT8 pBuffer, E_UINT32 bufferSize) 
     9typedef bool (*PFPassFillStrategy)(E_PUINT8, UINT_PTR); 
     10static bool oneFill(E_PUINT8 pBuffer, UINT_PTR bufferSize) 
    1111{ 
    1212    memset(pBuffer, 1, bufferSize); 
    1313    return true; 
    1414} 
    15 static bool zeroFill(E_PUINT8 pBuffer, E_UINT32 bufferSize) 
     15static bool zeroFill(E_PUINT8 pBuffer, UINT_PTR bufferSize) 
    1616{ 
    1717    memset(pBuffer, 0, bufferSize); 
  • trunk/SchedulerView.cpp

    r883 r884  
    523523        { 
    524524            int nItem; 
    525             INT_PTR iSize = pDoc->m_paScheduledTasks.GetSize(); 
     525            DWORD_PTR iSize = pDoc->m_paScheduledTasks.GetSize(); 
    526526            DWORD_PTR nIndex; 
    527527            CScheduleItem *psiItem = 0; 
Note: See TracChangeset for help on using the changeset viewer.