Fix uninitialized okeybuf
authorfoxit <jun_fang@foxitsoftware.com>
Thu, 10 Jul 2014 19:10:06 +0000 (12:10 -0700)
committerfoxit <jun_fang@foxitsoftware.com>
Thu, 10 Jul 2014 19:10:06 +0000 (12:10 -0700)
BUG=387011
R=palmer@chromium.org

Review URL: https://codereview.chromium.org/382603003

core/src/fpdfapi/fpdf_parser/fpdf_parser_encrypt.cpp

index 417801b..9dddd86 100644 (file)
@@ -461,6 +461,7 @@ CFX_ByteString CPDF_StandardSecurityHandler::GetUserPassword(FX_LPCBYTE owner_pa
         okeylen = 32;
     }
     FX_BYTE okeybuf[64];
+    FXSYS_memset32(okeybuf, 0, sizeof(okeybuf));
     FXSYS_memcpy32(okeybuf, (FX_LPCSTR)okey, okeylen);
     if (m_Revision == 2) {
         CRYPT_ArcFourCryptBlock(okeybuf, okeylen, enckey, key_len);