vuminhdao / pdfium

Automatically exported from code.google.com/p/pdfium
0 stars 0 forks source link

CPDF_StandardCryptoHandler::CryptStart() probably doesn't work on big endian architectures. #147

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
There's some code where we have 
  ... FX_DWORD objnum, FX_DWORD gennum ...
Then
    FXSYS_memcpy32(key1, m_EncryptKey, m_KeyLen);
    FXSYS_memcpy32(key1 + m_KeyLen, &objnum, 3);
    FXSYS_memcpy32(key1 + m_KeyLen + 3, &gennum, 2);

Picking up the first 3 bytes of objnum and the first 2 bytes of gennum, whose 
value depends on the endianness of the platform.

Original issue reported on code.google.com by tsepez@chromium.org on 1 May 2015 at 12:16