summaryrefslogtreecommitdiff
path: root/core/include/fxcodec/fx_codec.h
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-10-29 09:51:03 -0700
committerTom Sepez <tsepez@chromium.org>2015-10-29 09:51:03 -0700
commit83488a802d3e6f02faad6accbc17aa5da5795e63 (patch)
treeaeb72bfc3c2bef29eb432a2ff353ace231d42b55 /core/include/fxcodec/fx_codec.h
parent58a9ba4f2c0cb4122e6a278079f7c2ba7363ad51 (diff)
downloadpdfium-83488a802d3e6f02faad6accbc17aa5da5795e63.tar.xz
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 .
Diffstat (limited to 'core/include/fxcodec/fx_codec.h')
-rw-r--r--core/include/fxcodec/fx_codec.h18
1 files changed, 3 insertions, 15 deletions
diff --git a/core/include/fxcodec/fx_codec.h b/core/include/fxcodec/fx_codec.h
index 3ac9434861..8eacbb2e96 100644
--- a/core/include/fxcodec/fx_codec.h
+++ b/core/include/fxcodec/fx_codec.h
@@ -7,6 +7,7 @@
#ifndef CORE_INCLUDE_FXCODEC_FX_CODEC_H_
#define CORE_INCLUDE_FXCODEC_FX_CODEC_H_
+#include <map>
#include <vector>
#include "../../../third_party/base/nonstd_unique_ptr.h"
@@ -502,37 +503,24 @@ void AdobeCMYK_to_sRGB1(uint8_t c,
uint8_t& G,
uint8_t& B);
FX_BOOL MD5ComputeID(const void* buf, FX_DWORD dwSize, uint8_t ID[16]);
+
class CFX_DIBAttribute {
public:
CFX_DIBAttribute();
~CFX_DIBAttribute();
int32_t m_nXDPI;
-
int32_t m_nYDPI;
-
FX_FLOAT m_fAspectRatio;
-
FX_WORD m_wDPIUnit;
-
CFX_ByteString m_strAuthor;
-
uint8_t m_strTime[20];
-
int32_t m_nGifLeft;
int32_t m_nGifTop;
-
FX_DWORD* m_pGifLocalPalette;
-
FX_DWORD m_nGifLocalPalNum;
-
int32_t m_nBmpCompressType;
- class IFX_DIBAttributeExif* m_pExif;
-};
-class IFX_DIBAttributeExif {
- public:
- virtual ~IFX_DIBAttributeExif(){};
- virtual FX_BOOL GetInfo(FX_WORD tag, void* val) = 0;
+ std::map<FX_DWORD, void*> m_Exif;
};
FX_BOOL FaxSkipEOL(const uint8_t* src_buf, int bitsize, int& bitpos);