| OLD | NEW | 
|---|
| 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 "JBig2_Context.h" | 7 #include "JBig2_Context.h" | 
| 8 | 8 | 
| 9 #include <list> | 9 #include <list> | 
| 10 | 10 | 
| (...skipping 363 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 374       FX_WORD wTemp; | 374       FX_WORD wTemp; | 
| 375       nonstd::unique_ptr<JBig2PageInfo> pPageInfo(new JBig2PageInfo); | 375       nonstd::unique_ptr<JBig2PageInfo> pPageInfo(new JBig2PageInfo); | 
| 376       if (m_pStream->readInteger(&pPageInfo->m_dwWidth) != 0 || | 376       if (m_pStream->readInteger(&pPageInfo->m_dwWidth) != 0 || | 
| 377           m_pStream->readInteger(&pPageInfo->m_dwHeight) != 0 || | 377           m_pStream->readInteger(&pPageInfo->m_dwHeight) != 0 || | 
| 378           m_pStream->readInteger(&pPageInfo->m_dwResolutionX) != 0 || | 378           m_pStream->readInteger(&pPageInfo->m_dwResolutionX) != 0 || | 
| 379           m_pStream->readInteger(&pPageInfo->m_dwResolutionY) != 0 || | 379           m_pStream->readInteger(&pPageInfo->m_dwResolutionY) != 0 || | 
| 380           m_pStream->read1Byte(&pPageInfo->m_cFlags) != 0 || | 380           m_pStream->read1Byte(&pPageInfo->m_cFlags) != 0 || | 
| 381           m_pStream->readShortInteger(&wTemp) != 0) { | 381           m_pStream->readShortInteger(&wTemp) != 0) { | 
| 382         return JBIG2_ERROR_TOO_SHORT; | 382         return JBIG2_ERROR_TOO_SHORT; | 
| 383       } | 383       } | 
| 384       pPageInfo->m_bIsStriped = ((wTemp >> 15) & 1) ? TRUE : FALSE; | 384       pPageInfo->m_bIsStriped = !!(wTemp & 0x8000); | 
| 385       pPageInfo->m_wMaxStripeSize = wTemp & 0x7fff; | 385       pPageInfo->m_wMaxStripeSize = wTemp & 0x7fff; | 
| 386       bool bMaxHeight = (pPageInfo->m_dwHeight == 0xffffffff); | 386       bool bMaxHeight = (pPageInfo->m_dwHeight == 0xffffffff); | 
| 387       if (bMaxHeight && pPageInfo->m_bIsStriped != TRUE) | 387       if (bMaxHeight && pPageInfo->m_bIsStriped != TRUE) | 
| 388         pPageInfo->m_bIsStriped = TRUE; | 388         pPageInfo->m_bIsStriped = TRUE; | 
| 389 | 389 | 
| 390       if (!m_bBufSpecified) { | 390       if (!m_bBufSpecified) { | 
| 391         FX_DWORD height = | 391         FX_DWORD height = | 
| 392             bMaxHeight ? pPageInfo->m_wMaxStripeSize : pPageInfo->m_dwHeight; | 392             bMaxHeight ? pPageInfo->m_wMaxStripeSize : pPageInfo->m_dwHeight; | 
| 393         m_pPage.reset(new CJBig2_Image(pPageInfo->m_dwWidth, height)); | 393         m_pPage.reset(new CJBig2_Image(pPageInfo->m_dwWidth, height)); | 
| 394       } | 394       } | 
| (...skipping 1025 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 1420         SBSYMCODES[CURTEMP].code = CURCODE; | 1420         SBSYMCODES[CURTEMP].code = CURCODE; | 
| 1421         CURCODE = CURCODE + 1; | 1421         CURCODE = CURCODE + 1; | 
| 1422       } | 1422       } | 
| 1423       CURTEMP = CURTEMP + 1; | 1423       CURTEMP = CURTEMP + 1; | 
| 1424     } | 1424     } | 
| 1425     CURLEN = CURLEN + 1; | 1425     CURLEN = CURLEN + 1; | 
| 1426   } | 1426   } | 
| 1427   FX_Free(LENCOUNT); | 1427   FX_Free(LENCOUNT); | 
| 1428   FX_Free(FIRSTCODE); | 1428   FX_Free(FIRSTCODE); | 
| 1429 } | 1429 } | 
| OLD | NEW | 
|---|