diff options
author | Robin Watts <robin@peeves.(none)> | 2013-11-27 10:23:07 -0800 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2013-11-28 00:15:19 +0000 |
commit | 16158407233ab95669dcf54725a628315522c905 (patch) | |
tree | 50e511453eb2401189cea5acfdc3754636aaeef5 /source/pdf | |
parent | 60336ef6deff24089e00dea02b2435450ea6601e (diff) | |
download | mupdf-16158407233ab95669dcf54725a628315522c905.tar.xz |
Bug 694118: Fix valgrind warning caused by overflowing function
We were miscalculating the offsets into a sampled functions table,
causing us to overrun the end. Fixed here.
Diffstat (limited to 'source/pdf')
-rw-r--r-- | source/pdf/pdf-function.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/source/pdf/pdf-function.c b/source/pdf/pdf-function.c index 7725544c..510e36cf 100644 --- a/source/pdf/pdf-function.c +++ b/source/pdf/pdf-function.c @@ -1077,7 +1077,7 @@ eval_sample_func(fz_context *ctx, pdf_function *func, float *in, float *out) scale[0] = func->base.n; for (i = 1; i < func->base.m; i++) - scale[i] = scale[i - 1] * func->u.sa.size[i]; + scale[i] = scale[i - 1] * func->u.sa.size[i-1]; for (i = 0; i < func->base.n; i++) { |