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

Side by Side Diff: core/src/fxcodec/jbig2/JBig2_Image.cpp

Issue 1147353006: Move fx_safe_types.h to include/ directory. (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 5 years, 6 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/src/fxcodec/codec/fx_codec_jpeg.cpp ('k') | core/src/fxcrt/extension.h » ('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 <limits.h> 7 #include <limits.h>
8
8 #include "../../../include/fxcrt/fx_basic.h" 9 #include "../../../include/fxcrt/fx_basic.h"
9 #include "../../../include/fxcrt/fx_coordinates.h" 10 #include "../../../include/fxcrt/fx_coordinates.h"
10 #include "../../../src/fxcrt/fx_safe_types.h" 11 #include "../../../include/fxcrt/fx_safe_types.h"
11 #include "JBig2_Image.h" 12 #include "JBig2_Image.h"
12 13
13 CJBig2_Image::CJBig2_Image(FX_INT32 w, FX_INT32 h) 14 CJBig2_Image::CJBig2_Image(FX_INT32 w, FX_INT32 h)
14 { 15 {
15 m_nWidth = w; 16 m_nWidth = w;
16 m_nHeight = h; 17 m_nHeight = h;
17 if (m_nWidth <= 0 || m_nHeight <= 0 || m_nWidth > INT_MAX - 31) { 18 if (m_nWidth <= 0 || m_nHeight <= 0 || m_nWidth > INT_MAX - 31) {
18 m_pData = NULL; 19 m_pData = NULL;
19 m_bNeedFree = FALSE; 20 m_bNeedFree = FALSE;
20 return; 21 return;
(...skipping 1600 matching lines...) Expand 10 before | Expand all | Expand 10 after
1621 dp[2] = (FX_BYTE)(tmp >> 8); 1622 dp[2] = (FX_BYTE)(tmp >> 8);
1622 dp[3] = (FX_BYTE)tmp; 1623 dp[3] = (FX_BYTE)tmp;
1623 } 1624 }
1624 lineSrc += m_nStride; 1625 lineSrc += m_nStride;
1625 lineDst += pDst->m_nStride; 1626 lineDst += pDst->m_nStride;
1626 } 1627 }
1627 } 1628 }
1628 } 1629 }
1629 return 1; 1630 return 1;
1630 } 1631 }
OLDNEW
« no previous file with comments | « core/src/fxcodec/codec/fx_codec_jpeg.cpp ('k') | core/src/fxcrt/extension.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698