Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(643)

Side by Side Diff: core/src/fdrm/crypto/fx_crypt.cpp

Issue 896023003: Prevent base::CheckedNumeric from leaking outside of pdfium. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Add name of new .h to build files. Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « core/include/fxcrt/fx_system.h ('k') | core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 PDFium Authors. All rights reserved. 1 // Copyright 2014 PDFium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com 5 // Original code copyright 2014 Foxit Software Inc. http://www.foxitsoftware.com
6 6
7 #include "../../../include/fxcrt/fx_basic.h" 7 #include "../../../include/fxcrt/fx_basic.h"
8 #include "../../../include/fdrm/fx_crypt.h" 8 #include "../../../include/fdrm/fx_crypt.h"
9 #include "../../../src/fxcrt/fx_safe_types.h"
10
9 #ifdef __cplusplus 11 #ifdef __cplusplus
10 extern "C" { 12 extern "C" {
11 #endif 13 #endif
12 struct rc4_state { 14 struct rc4_state {
13 int x, y, m[256]; 15 int x, y, m[256];
14 }; 16 };
15 void CRYPT_ArcFourSetup(void* context, FX_LPCBYTE key, FX_DWORD length ) 17 void CRYPT_ArcFourSetup(void* context, FX_LPCBYTE key, FX_DWORD length )
16 { 18 {
17 rc4_state *s = (rc4_state*)context; 19 rc4_state *s = (rc4_state*)context;
18 int i, j, k, *m, a; 20 int i, j, k, *m, a;
(...skipping 231 matching lines...) Expand 10 before | Expand all | Expand 10 after
250 CRYPT_MD5Finish(&ctx, digest); 252 CRYPT_MD5Finish(&ctx, digest);
251 } 253 }
252 static FX_BOOL (*g_PubKeyDecryptor)(FX_LPCBYTE pData, FX_DWORD size, FX_LPBYTE d ata_buf, FX_DWORD& data_len) = NULL; 254 static FX_BOOL (*g_PubKeyDecryptor)(FX_LPCBYTE pData, FX_DWORD size, FX_LPBYTE d ata_buf, FX_DWORD& data_len) = NULL;
253 void CRYPT_SetPubKeyDecryptor(FX_BOOL (*func)(FX_LPCBYTE pData, FX_DWORD size, F X_LPBYTE data_buf, FX_DWORD& data_len)) 255 void CRYPT_SetPubKeyDecryptor(FX_BOOL (*func)(FX_LPCBYTE pData, FX_DWORD size, F X_LPBYTE data_buf, FX_DWORD& data_len))
254 { 256 {
255 g_PubKeyDecryptor = func; 257 g_PubKeyDecryptor = func;
256 } 258 }
257 #ifdef __cplusplus 259 #ifdef __cplusplus
258 }; 260 };
259 #endif 261 #endif
OLDNEW
« no previous file with comments | « core/include/fxcrt/fx_system.h ('k') | core/src/fpdfapi/fpdf_page/fpdf_page_func.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698