summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortracy_jiang <tracy_jiang@foxitsoftware.com>2016-09-12 10:11:10 -0700
committerCommit bot <commit-bot@chromium.org>2016-09-12 10:11:10 -0700
commit0b022056c74c00d0c52166e33c81c8b842d00d63 (patch)
tree9137bf7abe32a03e2cda6a1a443616711e39a85c
parent25a7f3e58b6a7f3396e529f38e81f93fb87c4045 (diff)
downloadpdfium-0b022056c74c00d0c52166e33c81c8b842d00d63.tar.xz
change memcpy to memmove for potential nearby addresses
BUG=645186 Review-Url: https://codereview.chromium.org/2326103002
-rw-r--r--core/fxcodec/codec/fx_codec_progress.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/core/fxcodec/codec/fx_codec_progress.cpp b/core/fxcodec/codec/fx_codec_progress.cpp
index 3551fc272d..9ac6913788 100644
--- a/core/fxcodec/codec/fx_codec_progress.cpp
+++ b/core/fxcodec/codec/fx_codec_progress.cpp
@@ -334,7 +334,7 @@ FX_BOOL CCodec_ProgressiveDecoder::JpegReadMoreData(
} else {
uint32_t dwConsume = m_SrcSize - dwAvail;
if (dwAvail) {
- FXSYS_memcpy(m_pSrcBuf, m_pSrcBuf + dwConsume, dwAvail);
+ FXSYS_memmove(m_pSrcBuf, m_pSrcBuf + dwConsume, dwAvail);
}
if (dwSize > dwConsume) {
dwSize = dwConsume;
@@ -607,7 +607,7 @@ FX_BOOL CCodec_ProgressiveDecoder::GifReadMoreData(CCodec_GifModule* pGifModule,
} else {
uint32_t dwConsume = m_SrcSize - dwAvail;
if (dwAvail) {
- FXSYS_memcpy(m_pSrcBuf, m_pSrcBuf + dwConsume, dwAvail);
+ FXSYS_memmove(m_pSrcBuf, m_pSrcBuf + dwConsume, dwAvail);
}
if (dwSize > dwConsume) {
dwSize = dwConsume;
@@ -787,7 +787,7 @@ void CCodec_ProgressiveDecoder::GifReadScanlineCallback(void* pModule,
uint8_t* scan_des =
(uint8_t*)pDIBitmap->GetScanline(cur_row) + des_ScanOffet;
uint32_t size = pCodec->m_sizeX * des_Bpp;
- FXSYS_memcpy(scan_des, scan_src, size);
+ FXSYS_memmove(scan_des, scan_src, size);
}
}
if (bLastPass)
@@ -897,7 +897,7 @@ FX_BOOL CCodec_ProgressiveDecoder::BmpReadMoreData(CCodec_BmpModule* pBmpModule,
} else {
uint32_t dwConsume = m_SrcSize - dwAvail;
if (dwAvail) {
- FXSYS_memcpy(m_pSrcBuf, m_pSrcBuf + dwConsume, dwAvail);
+ FXSYS_memmove(m_pSrcBuf, m_pSrcBuf + dwConsume, dwAvail);
}
if (dwSize > dwConsume) {
dwSize = dwConsume;
@@ -972,7 +972,7 @@ void CCodec_ProgressiveDecoder::ResampleVertBT(CFX_DIBitmap* pDeviceBitmap,
uint8_t* scan_des =
(uint8_t*)pDeviceBitmap->GetScanline(des_row) + des_ScanOffet;
uint32_t size = m_sizeX * des_Bpp;
- FXSYS_memcpy(scan_des, scan_src, size);
+ FXSYS_memmove(scan_des, scan_src, size);
}
return;
}
@@ -1708,7 +1708,7 @@ void CCodec_ProgressiveDecoder::ResampleVert(CFX_DIBitmap* pDeviceBitmap,
uint8_t* scan_des =
(uint8_t*)pDeviceBitmap->GetScanline(des_row) + des_ScanOffet;
uint32_t size = m_sizeX * des_Bpp;
- FXSYS_memcpy(scan_des, scan_src, size);
+ FXSYS_memmove(scan_des, scan_src, size);
}
}
return;
@@ -1783,7 +1783,7 @@ void CCodec_ProgressiveDecoder::ResampleVert(CFX_DIBitmap* pDeviceBitmap,
uint8_t* scan_des =
(uint8_t*)pDeviceBitmap->GetScanline(des_row) + des_ScanOffet;
uint32_t size = m_sizeX * des_Bpp;
- FXSYS_memcpy(scan_des, scan_src, size);
+ FXSYS_memmove(scan_des, scan_src, size);
}
}
return;
@@ -1799,7 +1799,7 @@ void CCodec_ProgressiveDecoder::ResampleVert(CFX_DIBitmap* pDeviceBitmap,
uint8_t* scan_des =
(uint8_t*)pDeviceBitmap->GetScanline(des_row + i) + des_ScanOffet;
uint32_t size = m_sizeX * des_Bpp;
- FXSYS_memcpy(scan_des, scan_src, size);
+ FXSYS_memmove(scan_des, scan_src, size);
}
}
}