summaryrefslogtreecommitdiff
path: root/source/fitz
diff options
context:
space:
mode:
authorSebastian Rasmussen <sebras@gmail.com>2015-07-25 12:23:44 +0200
committerSebastian Rasmussen <sebras@gmail.com>2015-07-26 13:25:07 +0200
commitb1c2fd4e46d7dffa458a00f1e03471b52b62f01a (patch)
tree7593befaf70ee18d3f5fa341d5f1b0d64201be57 /source/fitz
parent48cbb0fe106cdee008b41883dff830c7530c663e (diff)
downloadmupdf-b1c2fd4e46d7dffa458a00f1e03471b52b62f01a.tar.xz
Ignore excessive output from PDF functions.
Previously all output values were used, causing buffer overflows. Fixes one issue from bug 696012.
Diffstat (limited to 'source/fitz')
-rw-r--r--source/fitz/function.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/source/fitz/function.c b/source/fitz/function.c
index 5dbe9f9c..75e47a94 100644
--- a/source/fitz/function.c
+++ b/source/fitz/function.c
@@ -19,10 +19,8 @@ fz_eval_function(fz_context *ctx, fz_function *func, const float *in, int inlen,
if (outlen < func->n)
{
func->evaluate(ctx, func, in, fakeout);
- for (i = 0; i < func->n; ++i)
+ for (i = 0; i < outlen; ++i)
out[i] = fakeout[i];
- for (; i < outlen; ++i)
- out[i] = 0;
}
else
{