Summary: | Buffer overflow vulnerability in expoential function parsing... | ||
---|---|---|---|
Product: | MuPDF | Reporter: | Sebastian Rasmussen <sebastian.rasmussen> |
Component: | mupdf | Assignee: | Tor Andersson <tor.andersson> |
Status: | RESOLVED FIXED | ||
Severity: | normal | ||
Priority: | P4 | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | All | ||
Customer: | Word Size: | --- | |
Attachments: | This is the original .pdf that causes the problem. |
Description
Sebastian Rasmussen
2009-06-21 14:32:13 UTC
Created attachment 5134 [details]
This is the original .pdf that causes the problem.
A patch like the one below ought to fix the problem. I'll provide it for you to pull. / Sebastian --- mupdf2.work.orig/mupdf/pdf_function.c 2009-06-21 23:35:27.000000000 +0200 +++ mupdf2.work.patched/mupdf/pdf_function.c 2009-06-21 23:35:27.000000000 +0200 @@ -1163,6 +1163,8 @@ loadexponentialfunc(pdf_function *func, if (fz_isarray(obj)) { func->n = fz_arraylen(obj); + if (func->n >= MAXN) + return fz_throw("exponential function result array too big"); for (i = 0; i < func->n; ++i) func->u.e.c0[i] = fz_toreal(fz_arrayget(obj, i)); pdf_logrsrc("c0 %d\n", func->n); |