summaryrefslogtreecommitdiff
path: root/core/src/fxcodec/codec/fx_codec_jbig.cpp
diff options
context:
space:
mode:
authorTom Sepez <tsepez@chromium.org>2015-05-19 15:19:32 -0700
committerTom Sepez <tsepez@chromium.org>2015-05-19 15:19:32 -0700
commit981a3468319eb24e696bb64ba84d9631fd26f1f7 (patch)
treec1136b807975ccc80199ff6593e69475261c1670 /core/src/fxcodec/codec/fx_codec_jbig.cpp
parentbf4aa2cc93a67826247e887b2ba26a1b965eb616 (diff)
downloadpdfium-981a3468319eb24e696bb64ba84d9631fd26f1f7.tar.xz
Re-land: Remove FX_Alloc() null checks now that it can't return NULL.
Fixes the ordering of some assignments broken when converting to checked numerics in CFX_PathData::AddPointCount(). Original Review URL: https://codereview.chromium.org/1142713005 R=thestig@chromium.org Review URL: https://codereview.chromium.org/1135893008
Diffstat (limited to 'core/src/fxcodec/codec/fx_codec_jbig.cpp')
-rw-r--r--core/src/fxcodec/codec/fx_codec_jbig.cpp6
1 files changed, 0 insertions, 6 deletions
diff --git a/core/src/fxcodec/codec/fx_codec_jbig.cpp b/core/src/fxcodec/codec/fx_codec_jbig.cpp
index 278d9cbcf6..8fcd9f4711 100644
--- a/core/src/fxcodec/codec/fx_codec_jbig.cpp
+++ b/core/src/fxcodec/codec/fx_codec_jbig.cpp
@@ -53,9 +53,6 @@ FX_BOOL CCodec_Jbig2Module::Decode(IFX_FileRead* file_ptr,
CJBig2_Image* dest_image = NULL;
FX_DWORD src_size = (FX_DWORD)file_ptr->GetSize();
FX_LPBYTE src_buf = FX_Alloc(FX_BYTE, src_size);
- if (src_buf == NULL) {
- return FALSE;
- }
int ret = 0;
if(!file_ptr->ReadBlock(src_buf, 0, src_size)) {
goto failed;
@@ -133,9 +130,6 @@ FXCODEC_STATUS CCodec_Jbig2Module::StartDecode(void* pJbig2Context, IFX_FileRead
m_pJbig2Context->m_dest_image = NULL;
m_pJbig2Context->m_src_size = (FX_DWORD)file_ptr->GetSize();
m_pJbig2Context->m_src_buf = FX_Alloc(FX_BYTE, m_pJbig2Context->m_src_size);
- if (m_pJbig2Context->m_src_buf == NULL) {
- return FXCODEC_STATUS_ERR_MEMORY;
- }
int ret = 0;
if(!file_ptr->ReadBlock((void*)m_pJbig2Context->m_src_buf, 0, m_pJbig2Context->m_src_size)) {
goto failed;