summaryrefslogtreecommitdiff
path: root/core/fpdfapi/page/fpdf_page_func.cpp
diff options
context:
space:
mode:
authortsepez <tsepez@chromium.org>2017-01-23 14:36:20 -0800
committerCommit bot <commit-bot@chromium.org>2017-01-23 14:36:20 -0800
commit4022f87eb8716155291543efaaf289e51d7cbf43 (patch)
tree28e2a3b99367932ee84a92b1f6c913245e62afb1 /core/fpdfapi/page/fpdf_page_func.cpp
parentb76f49b36baffea2b2ecb90d67c7b6bb734e7bb9 (diff)
downloadpdfium-4022f87eb8716155291543efaaf289e51d7cbf43.tar.xz
Update safe numerics package to get bitwise ops
Fix callers conventions to avoid ambiguity. Fix bad bounds check unmasked by change. Directly include headers no longer pulled in by numerics itself. Review-Url: https://codereview.chromium.org/2640143003
Diffstat (limited to 'core/fpdfapi/page/fpdf_page_func.cpp')
-rw-r--r--core/fpdfapi/page/fpdf_page_func.cpp5
1 files changed, 2 insertions, 3 deletions
diff --git a/core/fpdfapi/page/fpdf_page_func.cpp b/core/fpdfapi/page/fpdf_page_func.cpp
index 672bfc02be..9949e052c9 100644
--- a/core/fpdfapi/page/fpdf_page_func.cpp
+++ b/core/fpdfapi/page/fpdf_page_func.cpp
@@ -574,10 +574,9 @@ bool CPDF_SampledFunc::v_Call(FX_FLOAT* inputs, FX_FLOAT* results) const {
if (!pSampleData)
return false;
- for (uint32_t j = 0; j < m_nOutputs; j++) {
+ for (uint32_t j = 0; j < m_nOutputs; j++, bitpos += m_nBitsPerSample) {
uint32_t sample =
- GetBits32(pSampleData, bitpos.ValueOrDie() + j * m_nBitsPerSample,
- m_nBitsPerSample);
+ GetBits32(pSampleData, bitpos.ValueOrDie(), m_nBitsPerSample);
FX_FLOAT encoded = (FX_FLOAT)sample;
for (uint32_t i = 0; i < m_nInputs; i++) {
if (index[i] == m_EncodeInfo[i].sizes - 1) {