From 83488a802d3e6f02faad6accbc17aa5da5795e63 Mon Sep 17 00:00:00 2001 From: Tom Sepez Date: Thu, 29 Oct 2015 09:51:03 -0700 Subject: XFA: remove unsafe exif parsing code Fortunately, this could only be called with a null buffer, so none of unchecked lengths could be used. The remaining use of the CFX_/IFX_DIBAttributeEx class is as a table, so put one directly in the CFX_DIBAttribute. Fix a "register" warning along the way. R=dsinclair@chromium.org Review URL: https://codereview.chromium.org/1425983002 . --- core/src/fxcodec/codec/codec_int.h | 32 -------------------------------- 1 file changed, 32 deletions(-) (limited to 'core/src/fxcodec/codec/codec_int.h') diff --git a/core/src/fxcodec/codec/codec_int.h b/core/src/fxcodec/codec/codec_int.h index 510d0abe78..36716411b7 100644 --- a/core/src/fxcodec/codec/codec_int.h +++ b/core/src/fxcodec/codec/codec_int.h @@ -385,38 +385,6 @@ class CCodec_Jbig2Module : public ICodec_Jbig2Module { IFX_Pause* pPause) override; void DestroyJbig2Context(void* pJbig2Context) override; }; -class CFX_DIBAttributeExif : public IFX_DIBAttributeExif { - public: - CFX_DIBAttributeExif(); - ~CFX_DIBAttributeExif(); - virtual FX_BOOL GetInfo(FX_WORD tag, void* val); - - FX_BOOL ParseExif(CFX_MapPtrTemplate* pHead, - uint8_t* data, - FX_DWORD len, - CFX_MapPtrTemplate* pVal); - - typedef FX_WORD (*_Read2Bytes)(uint8_t* data); - typedef FX_DWORD (*_Read4Bytes)(uint8_t* data); - uint8_t* ParseExifIFH(uint8_t* data, - FX_DWORD len, - _Read2Bytes* pReadWord, - _Read4Bytes* pReadDword); - FX_BOOL ParseExifIFD(CFX_MapPtrTemplate* pMap, - uint8_t* data, - FX_DWORD len); - - uint8_t* m_pExifData; - - FX_DWORD m_dwExifDataLen; - - void clear(); - _Read2Bytes m_readWord; - _Read4Bytes m_readDword; - CFX_MapPtrTemplate m_TagHead; - CFX_MapPtrTemplate m_TagVal; -}; - struct DecodeData { public: DecodeData(unsigned char* src_data, OPJ_SIZE_T src_size) -- cgit v1.2.3