"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "CPP/7zip/Archive/7z/7zDecode.cpp" between
p7zip_15.14.1_src_all.tar.gz and p7zip_16.02_src_all.tar.gz

About: p7zip is a command-line file archiver with a high compression ratio (a port of the Windows program 7za.exe).

7zDecode.cpp  (p7zip_15.14.1_src_all):7zDecode.cpp  (p7zip_16.02_src_all)
skipping to change at line 402 skipping to change at line 402
RINOK(getTextPassword->CryptoGetTextPassword(&passwordBSTR)); RINOK(getTextPassword->CryptoGetTextPassword(&passwordBSTR));
passwordIsDefined = true; passwordIsDefined = true;
password.Empty(); password.Empty();
size_t len = 0; size_t len = 0;
if (passwordBSTR) if (passwordBSTR)
{ {
password = passwordBSTR; password = passwordBSTR;
len = password.Len(); len = password.Len();
} }
CByteBuffer buffer(len * 2); CByteBuffer buffer(len * 2);
for (size_t i = 0; i < len; i++) for (size_t k = 0; k < len; k++)
{ {
wchar_t c = passwordBSTR[i]; wchar_t c = passwordBSTR[k];
((Byte *)buffer)[i * 2] = (Byte)c; ((Byte *)buffer)[k * 2] = (Byte)c;
((Byte *)buffer)[i * 2 + 1] = (Byte)(c >> 8); ((Byte *)buffer)[k * 2 + 1] = (Byte)(c >> 8);
} }
RINOK(cryptoSetPassword->CryptoSetPassword((const Byte *)buffer, (UInt32 )buffer.Size())); RINOK(cryptoSetPassword->CryptoSetPassword((const Byte *)buffer, (UInt32 )buffer.Size()));
} }
} }
#endif #endif
{ {
CMyComPtr<ICompressSetFinishMode> setFinishMode; CMyComPtr<ICompressSetFinishMode> setFinishMode;
decoder->QueryInterface(IID_ICompressSetFinishMode, (void **)&setFinishMod e); decoder->QueryInterface(IID_ICompressSetFinishMode, (void **)&setFinishMod e);
if (setFinishMode) if (setFinishMode)
 End of changes. 2 change blocks. 
4 lines changed or deleted 4 lines changed or added

Home  |  About  |  All  |  Newest  |  Fossies Dox  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTPS